Implement new criterion 'window_type = normal|dialog|utility|toolbar|splash|menu|dropdown_menu|popup_menu|tooltip'

fixes #1658
This commit is contained in:
Ingo Bürk
2015-04-18 21:09:03 +02:00
parent 7e424b2d71
commit 550c0ec318
13 changed files with 142 additions and 24 deletions

View File

@ -7,11 +7,16 @@ xmacro(_NET_WM_STATE_DEMANDS_ATTENTION)
xmacro(_NET_WM_STATE_MODAL)
xmacro(_NET_WM_STATE)
xmacro(_NET_WM_WINDOW_TYPE)
xmacro(_NET_WM_WINDOW_TYPE_NORMAL)
xmacro(_NET_WM_WINDOW_TYPE_DOCK)
xmacro(_NET_WM_WINDOW_TYPE_DIALOG)
xmacro(_NET_WM_WINDOW_TYPE_UTILITY)
xmacro(_NET_WM_WINDOW_TYPE_TOOLBAR)
xmacro(_NET_WM_WINDOW_TYPE_SPLASH)
xmacro(_NET_WM_WINDOW_TYPE_MENU)
xmacro(_NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
xmacro(_NET_WM_WINDOW_TYPE_POPUP_MENU)
xmacro(_NET_WM_WINDOW_TYPE_TOOLTIP)
xmacro(_NET_WM_DESKTOP)
xmacro(_NET_WM_STRUT_PARTIAL)
xmacro(_NET_CLIENT_LIST)

View File

@ -378,6 +378,9 @@ struct Window {
* default will be 'accepts focus'. */
bool doesnt_accept_focus;
/** The _NET_WM_WINDOW_TYPE for this window. */
xcb_atom_t window_type;
/** Whether the window says it is a dock window */
enum { W_NODOCK = 0,
W_DOCK_TOP = 1,
@ -408,6 +411,7 @@ struct Match {
struct regex *instance;
struct regex *mark;
struct regex *window_role;
xcb_atom_t window_type;
enum {
U_DONTCHECK = -1,
U_LATEST = 0,

View File

@ -108,6 +108,16 @@ void xcb_raise_window(xcb_connection_t *conn, xcb_window_t window);
*/
void xcb_set_window_rect(xcb_connection_t *conn, xcb_window_t window, Rect r);
/**
* Returns the first supported _NET_WM_WINDOW_TYPE atom.
*
*/
xcb_atom_t xcb_get_preferred_window_type(xcb_get_property_reply_t *reply);
/**
* Returns true if the given reply contains the given data.
*
*/
bool xcb_reply_contains_atom(xcb_get_property_reply_t *prop, xcb_atom_t atom);
/**