http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/x11/fspanel/patches/patch-ab?rev=1.2;content-type=text/plain http://bugs.gentoo.org/show_bug.cgi?id=324509 --- fspanel.c +++ fspanel.c @@ -559,10 +559,10 @@ /* 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 +678,11 @@ 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