Select SubstructureRedirect on our systray window

This ensures that systray icons cannot resize themselves. We assign them some
size and they have to deal with what they get!

Fixes: https://github.com/awesomeWM/awesome/issues/487

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-10-10 20:34:43 +02:00
parent b34a653448
commit 4daa6e8bef
2 changed files with 8 additions and 2 deletions

View File

@ -373,6 +373,12 @@ event_handle_configurerequest(xcb_configure_request_event_t *ev)
/* ICCCM 4.1.5 / 4.2.3, if nothing was changed, send an event saying so */
client_send_configure(c);
}
else if (xembed_getbywin(&globalconf.embedded, ev->window))
{
/* Ignore this so that systray icons cannot resize themselves.
* We decide their size!
*/
}
else
event_handle_configurerequest_configure_window(ev);
}

View File

@ -48,8 +48,8 @@ systray_init(void)
xscreen->root,
-1, -1, 1, 1, 0,
XCB_COPY_FROM_PARENT, xscreen->root_visual,
XCB_CW_BACK_PIXEL, (const uint32_t [])
{ xscreen->black_pixel });
XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK, (const uint32_t [])
{ xscreen->black_pixel, XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT });
atom_name = xcb_atom_name_by_screen("_NET_SYSTEM_TRAY", globalconf.default_screen);
if(!atom_name)