all repos — tint2 @ a6879ea2a5df21f0d3f77605ae80952e930ae993

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

Proper workaround for issue #555
o9000 mrovi9000@gmail.com
commit

a6879ea2a5df21f0d3f77605ae80952e930ae993

parent

d2b32d528f92891d4b185f6febd08835b231c3a3

3 files changed, 17 insertions(+), 1 deletions(-)

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

@@ -603,6 +603,21 @@ (unsigned char *)state,

num_atoms); } +void replace_panel_all_desktops(Panel *p) +{ + XClientMessageEvent m; + memset(&m, 0, sizeof(m)); + m.type = ClientMessage; + m.send_event = True; + m.display = server.display; + m.window = p->main_win; + m.message_type = server.atom._NET_WM_DESKTOP; + m.format = 32; + m.data.l[0] = ALL_DESKTOPS; + XSendEvent(server.display, server.root_win, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent *)&m); + XSync(server.display, False); +} + void set_panel_properties(Panel *p) { XStoreName(server.display, p->main_win, panel_window_name);
M src/panel.hsrc/panel.h

@@ -155,6 +155,7 @@ void render_panel(Panel *panel);

void set_panel_items_order(Panel *p); void place_panel_all_desktops(Panel *p); +void replace_panel_all_desktops(Panel *p); void set_panel_properties(Panel *p); // draw background panel
M src/tint.csrc/tint.c

@@ -985,7 +985,7 @@ for (int i = 0; i < num_panels; i++) {

Panel *p = &panels[i]; if (win == p->main_win) { if (at == server.atom._NET_WM_DESKTOP && get_window_desktop(p->main_win) != ALL_DESKTOPS) - place_panel_all_desktops(p); + replace_panel_all_desktops(p); return; } }