all repos — tint2 @ 5ce8023ef7e2cfa606eba11417ab499aa470e332

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

systray: Watch for window events before reparenting
o9000 o9000
commit

5ce8023ef7e2cfa606eba11417ab499aa470e332

parent

6438c75faf8a3224b7c52cf356a38fa3ffd49cf6

1 files changed, 12 insertions(+), 12 deletions(-)

jump to
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -611,19 +611,13 @@ return TRUE;

Panel* panel = systray.area.panel; - // Reparent - if (systray_profile) - fprintf(stderr, "XSync(server.dsp, False)\n"); + // Watch for the icon trying to resize itself / closing again XSync(server.dsp, False); error = FALSE; XErrorHandler old = XSetErrorHandler(window_error_handler); if (systray_profile) - fprintf(stderr, "XReparentWindow(server.dsp, traywin->win, traywin->parent, 0, 0)\n"); - XReparentWindow(server.dsp, traywin->win, traywin->parent, 0, 0); - if (systray_profile) - fprintf(stderr, "XMoveResizeWindow(server.dsp, traywin->win = %ld, 0, 0, traywin->width = %d, traywin->height = %d)\n", traywin->win, traywin->width, traywin->height); - XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height); - + fprintf(stderr, "XSelectInput(server.dsp, traywin->win, StructureNotifyMask)\n"); + XSelectInput(server.dsp, traywin->win, StructureNotifyMask); XSync(server.dsp, False); XSetErrorHandler(old); if (error != FALSE) {

@@ -632,13 +626,19 @@ remove_icon(traywin);

return FALSE; } - // Watch for the icon trying to resize itself / closing again + // Reparent + if (systray_profile) + fprintf(stderr, "XSync(server.dsp, False)\n"); XSync(server.dsp, False); error = FALSE; old = XSetErrorHandler(window_error_handler); if (systray_profile) - fprintf(stderr, "XSelectInput(server.dsp, traywin->win, StructureNotifyMask)\n"); - XSelectInput(server.dsp, traywin->win, StructureNotifyMask); + fprintf(stderr, "XReparentWindow(server.dsp, traywin->win, traywin->parent, 0, 0)\n"); + XReparentWindow(server.dsp, traywin->win, traywin->parent, 0, 0); + if (systray_profile) + fprintf(stderr, "XMoveResizeWindow(server.dsp, traywin->win = %ld, 0, 0, traywin->width = %d, traywin->height = %d)\n", traywin->win, traywin->width, traywin->height); + XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height); + XSync(server.dsp, False); XSetErrorHandler(old); if (error != FALSE) {