pkgsrc/x11/fspanel/patches/patch-ab
reed 348ec7ac3f Patch fspanel.c so the workspace switching buttons (like 1, 2 ,3)
will work with blackbox. This is from Tero Koskinen on the blackbox list.
It also works with xfwm4 and window maker; and the patch should work
on all NetWM compliant window managers.

Tested and okayed by maintainer, Joel Carnat.

Bump PKGREVISION.
2005-08-01 17:10:32 +00:00

30 lines
863 B
Text

$NetBSD: patch-ab,v 1.2 2005/08/01 17:10:32 reed Exp $
--- fspanel.c.orig 2002-06-22 22:12:50.000000000 -0700
+++ fspanel.c 2005-07-28 11:28:40.000000000 -0700
@@ -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