Fixed a bug with reloading disabled icons

This commit is contained in:
vaxerski 2021-12-06 22:40:43 +01:00
parent 3c86cd2c13
commit 06b31f2a5a

View file

@ -525,12 +525,16 @@ int CStatusBar::drawTrayModule(SBarModule* mod, int off) {
int i = 0; int i = 0;
for (auto& tray : g_pWindowManager->trayclients) { for (auto& tray : g_pWindowManager->trayclients) {
if (tray.hidden)
continue;
uint32_t values[] = {(int)(position.x + (i * (ELEMENTWIDTH + PAD)) + PAD / 2.f), (int)position.y + 1, (int)XCB_STACK_MODE_ABOVE}; uint32_t values[] = {(int)(position.x + (i * (ELEMENTWIDTH + PAD)) + PAD / 2.f), (int)position.y + 1, (int)XCB_STACK_MODE_ABOVE};
if (tray.hidden) {
values[0] = -999;
values[1] = -999;
xcb_configure_window(g_pWindowManager->DisplayConnection, tray.window,
XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_STACK_MODE, values);
continue;
}
xcb_configure_window(g_pWindowManager->DisplayConnection, tray.window, xcb_configure_window(g_pWindowManager->DisplayConnection, tray.window,
XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_STACK_MODE, values); XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_STACK_MODE, values);