all repos — tint2 @ 7d0b0b85bc9e31285db8ea42866547bc4fb35f23

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

Check that the window desktop index is in the valid range
o9000 mrovi9000@gmail.com
commit

7d0b0b85bc9e31285db8ea42866547bc4fb35f23

parent

ec7e9e18adb480af1a755975fc9e336731a7dcc8

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

jump to
M src/util/window.csrc/util/window.c

@@ -109,7 +109,7 @@

int get_window_desktop(Window win) { if (!server.viewports) - return get_property32(win, server.atom._NET_WM_DESKTOP, XA_CARDINAL); + return MAX(0, MIN(server.num_desktops - 1, get_property32(win, server.atom._NET_WM_DESKTOP, XA_CARDINAL))); int x, y, w, h; get_window_coordinates(win, &x, &y, &w, &h);