Implement floating (please test and find bugs)

Details which are missing: A command to hide/show all floating clients,
moving/resizing clients with your mouse holding Mod1 (click anywhere
in the client, not just on its borders), resize/move by keyboard, select
next/previous client by keyboard
This commit is contained in:
Michael Stapelberg
2009-05-23 16:34:03 +02:00
parent 6bb0c82588
commit 5b8e2ecb18
12 changed files with 525 additions and 60 deletions

View File

@ -253,6 +253,8 @@ struct Client {
/* x, y, width, height of the frame */
Rect rect;
/* Position in floating mode and in tiling mode are saved separately */
Rect floating_rect;
/* x, y, width, height of the child (relative to its frame) */
Rect child_rect;
@ -282,6 +284,9 @@ struct Client {
/* fullscreen is pretty obvious */
bool fullscreen;
/* floating? (= not in tiling layout) */
bool floating;
/* Ensure TITLEBAR_TOP maps to 0 because we use calloc for initialization later */
enum { TITLEBAR_TOP = 0, TITLEBAR_LEFT, TITLEBAR_RIGHT, TITLEBAR_BOTTOM, TITLEBAR_OFF } titlebar_position;