all repos — tint2 @ 481c4096178a6300747351c8cb6acfe5256907a0

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

Fix bad interaction between freespace and systray
o9000 o9000
commit

481c4096178a6300747351c8cb6acfe5256907a0

parent

e8869b4d8736ffe8e88e0f064ff34f7f5f34ca0b

3 files changed, 10 insertions(+), 6 deletions(-)

jump to
M src/panel.csrc/panel.c

@@ -204,7 +204,7 @@ refresh_systray = 1;

} if (panel_items_order[k] == 'C') init_clock_panel(p); - if (panel_items_order[k] == 'F') + if (panel_items_order[k] == 'F' && !strstr(panel_items_order, "T")) init_freespace_panel(p); } set_panel_items_order(p);

@@ -420,7 +420,7 @@ }

} } if (panel->freespace.area.on_screen) - panel->freespace.area.resize = 1; + resize_freespace(&panel->freespace); return 0; }
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -224,7 +224,9 @@ }

// position and size the icon window XMoveResizeWindow(server.dsp, traywin->parent, traywin->x, traywin->y, traywin->width, traywin->height); - XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height); + if (traywin->reparented) { + XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height); + } } refresh_systray = 1; }

@@ -478,6 +480,7 @@ // printf("add_icon win %lx, %d\n", win, g_slist_length(systray.list_icons));

// Resize and redraw the systray systray.area.resize = 1; + systray.area.redraw = 1; panel_refresh = 1; return TRUE; }

@@ -496,7 +499,7 @@ XReparentWindow(server.dsp, traywin->win, traywin->parent, 0, 0);

XSync(server.dsp, False); XSetErrorHandler(old); if (error != FALSE) { - printf("systray %d: cannot embed icon for window %lu pid %d\n", __LINE__, traywin->win, traywin->pid); + printf("systray %d: cannot embed icon for window %lu parent %lu pid %d\n", __LINE__, traywin->win, traywin->parent, traywin->pid); remove_icon(traywin); return FALSE; }

@@ -574,7 +577,7 @@ XErrorHandler old;

// remove from our list systray.list_icons = g_slist_remove(systray.list_icons, traywin); - //printf("remove_icon: %d\n", traywin->win); + printf("remove_icon: %lu\n", traywin->win); XSelectInput(server.dsp, traywin->win, NoEventMask); if (traywin->damage)
M src/tint.csrc/tint.c

@@ -833,7 +833,8 @@ traywin = (TrayWindow*)l->data;

if (traywin->win == win) { //printf("move tray %d\n", traywin->x); XMoveResizeWindow(server.dsp, traywin->parent, traywin->x, traywin->y, traywin->width, traywin->height); - XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height); + if (traywin->reparented) + XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height); panel_refresh = 1; refresh_systray = 1; return;