Unmap the systray immediately when it becomes empty
The new widget layout code was created because we needed to support partial redraws (only redraw the parts that were changed). Thanks to this, the code also skips drawing widgets of size 0x0. Thus, when the systray becomes empty, it's :draw() callback isn't invoked and thus our systray container window stays visible. Fix this by making the C code unconditionally hide the systray when it becomes empty. There's nothing to display anyway. Fixes https://github.com/awesomeWM/awesome/issues/624 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
55b90cbd30
commit
8b3087dc4e
|
@ -254,6 +254,10 @@ luaA_systray_invalidate(void)
|
||||||
{
|
{
|
||||||
lua_State *L = globalconf_get_lua_State();
|
lua_State *L = globalconf_get_lua_State();
|
||||||
signal_object_emit(L, &global_signals, "systray::update", 0);
|
signal_object_emit(L, &global_signals, "systray::update", 0);
|
||||||
|
|
||||||
|
/* Unmap now if the systray became empty */
|
||||||
|
if(globalconf.embedded.len == 0)
|
||||||
|
xcb_unmap_window(globalconf.connection, globalconf.systray.window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -364,9 +368,6 @@ luaA_systray(lua_State *L)
|
||||||
xcb_map_window(globalconf.connection,
|
xcb_map_window(globalconf.connection,
|
||||||
globalconf.systray.window);
|
globalconf.systray.window);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
xcb_unmap_window(globalconf.connection,
|
|
||||||
globalconf.systray.window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lua_pushinteger(L, globalconf.embedded.len);
|
lua_pushinteger(L, globalconf.embedded.len);
|
||||||
|
|
Loading…
Reference in New Issue