Implement support for top/bottom dock clients (according to _NET_WM_STRUT_PARTIAL or requested position)

This commit is contained in:
Michael Stapelberg
2011-02-21 14:27:32 +01:00
parent 0f97b1fef6
commit ffc71859a3
7 changed files with 113 additions and 19 deletions

View File

@ -75,6 +75,18 @@ struct Rect {
uint32_t height;
} __attribute__((packed));
/**
* Stores the reserved pixels on each screen edge read from a
* _NET_WM_STRUT_PARTIAL.
*
*/
struct reservedpx {
uint32_t left;
uint32_t right;
uint32_t top;
uint32_t bottom;
};
/**
* Used for the cache of colorpixels.
*
@ -242,7 +254,10 @@ struct Window {
bool uses_net_wm_name;
/** Whether the window says it is a dock window */
bool dock;
enum { W_NODOCK = 0, W_DOCK_TOP = 1, W_DOCK_BOTTOM = 2 } dock;
/** Pixels the window reserves. left/right/top/bottom */
struct reservedpx reserved;
};
struct Match {
@ -254,7 +269,13 @@ struct Match {
char *class;
char *instance;
char *mark;
int dock;
enum {
M_DONTCHECK = -1,
M_NODOCK = 0,
M_DOCK_ANY = 1,
M_DOCK_TOP = 2,
M_DOCK_BOTTOM = 3
} dock;
xcb_window_t id;
Con *con_id;
enum { M_ANY = 0, M_TILING, M_FLOATING } floating;

View File

@ -36,4 +36,10 @@ void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop);
*/
void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop);
/**
* Updates the _NET_WM_STRUT_PARTIAL (reserved pixels at the screen edges)
*
*/
void window_update_strut_partial(i3Window *win, xcb_get_property_reply_t *prop);
#endif