Systray: Fix some flickering
Every time the systray was updated, we reparented the systray window to its drawin. However, when the systray was already reparented, this still caused it to be unmapped and mapped again. So, we only should reparent the systray when we have to, and not always just for the lulz. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
7edabc39fd
commit
35c05abe29
18
systray.c
18
systray.c
|
@ -328,14 +328,24 @@ luaA_systray(lua_State *L)
|
|||
if(globalconf.systray.parent == NULL)
|
||||
systray_register();
|
||||
|
||||
globalconf.systray.parent = w;
|
||||
|
||||
if(globalconf.embedded.len != 0)
|
||||
{
|
||||
if(globalconf.systray.parent != w)
|
||||
xcb_reparent_window(globalconf.connection,
|
||||
globalconf.systray.window,
|
||||
w->window,
|
||||
x, y);
|
||||
else
|
||||
{
|
||||
uint32_t config_vals[2] = { x, y };
|
||||
xcb_configure_window(globalconf.connection,
|
||||
globalconf.systray.window,
|
||||
XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y,
|
||||
config_vals);
|
||||
}
|
||||
|
||||
globalconf.systray.parent = w;
|
||||
|
||||
if(globalconf.embedded.len != 0)
|
||||
{
|
||||
systray_update(base_size, horiz);
|
||||
xcb_map_window(globalconf.connection,
|
||||
globalconf.systray.window);
|
||||
|
|
Loading…
Reference in New Issue