Merge branch 'fix_window_type_fallback' of https://github.com/psychon/awesome
This commit is contained in:
commit
959913dcd2
4
ewmh.c
4
ewmh.c
|
@ -574,6 +574,7 @@ ewmh_client_check_hints(client_t *c)
|
||||||
reply = xcb_get_property_reply(globalconf.connection, c2, NULL);
|
reply = xcb_get_property_reply(globalconf.connection, c2, NULL);
|
||||||
if(reply && (data = xcb_get_property_value(reply)))
|
if(reply && (data = xcb_get_property_value(reply)))
|
||||||
{
|
{
|
||||||
|
c->has_NET_WM_WINDOW_TYPE = true;
|
||||||
state = (xcb_atom_t *) data;
|
state = (xcb_atom_t *) data;
|
||||||
for(int i = 0; i < xcb_get_property_value_length(reply) / ssizeof(xcb_atom_t); i++)
|
for(int i = 0; i < xcb_get_property_value_length(reply) / ssizeof(xcb_atom_t); i++)
|
||||||
if(state[i] == _NET_WM_WINDOW_TYPE_DESKTOP)
|
if(state[i] == _NET_WM_WINDOW_TYPE_DESKTOP)
|
||||||
|
@ -590,7 +591,8 @@ ewmh_client_check_hints(client_t *c)
|
||||||
c->type = MAX(c->type, WINDOW_TYPE_TOOLBAR);
|
c->type = MAX(c->type, WINDOW_TYPE_TOOLBAR);
|
||||||
else if(state[i] == _NET_WM_WINDOW_TYPE_UTILITY)
|
else if(state[i] == _NET_WM_WINDOW_TYPE_UTILITY)
|
||||||
c->type = MAX(c->type, WINDOW_TYPE_UTILITY);
|
c->type = MAX(c->type, WINDOW_TYPE_UTILITY);
|
||||||
}
|
} else
|
||||||
|
c->has_NET_WM_WINDOW_TYPE = false;
|
||||||
|
|
||||||
p_delete(&reply);
|
p_delete(&reply);
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,8 @@ struct client_t
|
||||||
* from Lua. */
|
* from Lua. */
|
||||||
bool focusable;
|
bool focusable;
|
||||||
bool focusable_set;
|
bool focusable_set;
|
||||||
|
/** True if the client window has a _NET_WM_WINDOW_TYPE proeprty */
|
||||||
|
bool has_NET_WM_WINDOW_TYPE;
|
||||||
/** Window of the group leader */
|
/** Window of the group leader */
|
||||||
xcb_window_t group_window;
|
xcb_window_t group_window;
|
||||||
/** Window holding command needed to start it (session management related) */
|
/** Window holding command needed to start it (session management related) */
|
||||||
|
|
|
@ -114,7 +114,8 @@ property_update_wm_transient_for(client_t *c, xcb_get_property_cookie_t cookie)
|
||||||
c->transient_for_window = trans;
|
c->transient_for_window = trans;
|
||||||
|
|
||||||
luaA_object_push(L, c);
|
luaA_object_push(L, c);
|
||||||
client_set_type(L, -1, WINDOW_TYPE_DIALOG);
|
if (!c->has_NET_WM_WINDOW_TYPE)
|
||||||
|
client_set_type(L, -1, trans == XCB_NONE ? WINDOW_TYPE_NORMAL : WINDOW_TYPE_DIALOG);
|
||||||
client_set_above(L, -1, false);
|
client_set_above(L, -1, false);
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue