$NetBSD: patch-ab,v 1.3 2025/12/18 13:07:31 nia Exp $ --- fspanel.c.orig 2002-06-23 05:12:50.000000000 +0000 +++ fspanel.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -559,10 +560,10 @@ gui_draw_task (task *tk) /* check how many chars can fit */ len = strlen (tk->name); - while (1) + while (len > 0) { XftTextExtents8 (dd, xfs, tk->name, len, &ext); - if (ext.width < taskw - (text_x - x) - 2 && len > 0) + if (ext.width < taskw - (text_x - x) - 2) break; len--; } @@ -678,7 +679,11 @@ switch_desk (int new_desk) xev.message_type = atom__NET_CURRENT_DESKTOP; xev.format = 32; xev.data.l[0] = new_desk; - XSendEvent (dd, root_win, False, SubstructureNotifyMask, (XEvent *) &xev); + xev.data.l[1] = 0; + xev.data.l[2] = 0; + xev.data.l[3] = 0; + xev.data.l[4] = 0; + XSendEvent (dd, root_win, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent *) &xev); } void