openbsd-ports/x11/olvwm/patches/patch-olvwmrc_y

87 lines
2.0 KiB
Plaintext
Raw Normal View History

2004-01-28 15:58:53 -05:00
$OpenBSD: patch-olvwmrc_y,v 1.1 2004/01/28 20:58:54 naddy Exp $
--- olvwmrc.y.orig 1994-01-13 22:46:53.000000000 +0100
+++ olvwmrc.y 2004-01-28 21:49:10.000000000 +0100
1998-09-29 22:31:44 -04:00
@@ -5,7 +5,7 @@
%{
1998-09-29 22:31:44 -04:00
#ifdef IDENT
-#ident "@(#)olvwmrc.y 1.6 olvwm version 07 Jan 1994"
+#ident "@(#)olvwmrc.y 1.7 olvwm version 01/13/98"
1998-09-29 22:31:44 -04:00
#endif
#include <sys/types.h>
2004-01-28 15:58:53 -05:00
@@ -81,6 +81,7 @@ List *ProgKeyList = NULL;
List *WinMenuActionsList = NULL;
static Display *dpy;
+static unsigned int NumLockMask;
%}
2004-01-28 15:58:53 -05:00
@@ -526,7 +527,9 @@ String : WORD
}
%%
/* Programs */
+#ifndef YYDEBUG
#define YYDEBUG 1
1998-09-29 22:31:44 -04:00
+#endif
#include "parse.c"
extern List *ActiveClientList;
2004-01-28 15:58:53 -05:00
@@ -577,7 +580,7 @@ char name[];
return(True);
}
-static char *
+extern char *
strexpand(s)
char *s;
{
2004-01-28 15:58:53 -05:00
@@ -712,7 +715,8 @@ matchProgKey(p, ev)
1998-09-29 22:31:44 -04:00
{
if (p->keycode == ev->xkey.keycode &&
- (p->modmask == AnyModifier || p->modmask == ev->xkey.state))
+ (p->modmask == AnyModifier ||
+ (p->modmask == (~(NumLockMask|LockMask) & ev->xkey.state))))
return p;
return NULL;
}
2004-01-28 15:58:53 -05:00
@@ -799,14 +803,26 @@ struct stat statbuf;
extern List *ScreenInfoList;
List *l = ScreenInfoList;
ScreenInfo *scr;
+ Client *saveClient = NULL;
+ Window root, child;
+ int rx, ry, wx, wy;
+ unsigned int keys;
1998-09-29 22:31:44 -04:00
/* allow one warp per screen */
for (scr = ListEnum(&l); scr != NULL; scr = ListEnum(&l)) {
findClient_rootid = scr->rootid;
c = (Client *) ListApply(ActiveClientList, findClient, t);
- if (c)
- clientWarp(c);
+ if (c) {
+ if (XQueryPointer(dpy, c->groupid, &root, &child,
+ &rx, &ry, &wx, &wy, &keys)) {
+ clientWarp(c);
+ break;
+ }
+ else saveClient = c;
+ }
}
+ if (saveClient)
+ clientWarp(c);
findClient_rootid = 0;
}
free(s);
2004-01-28 15:58:53 -05:00
@@ -1249,6 +1265,7 @@ InitOlvwmRC(ldpy, path)
return;
olvwmOldBuf = olvwmBuf;
dpy = ldpy;
+ NumLockMask = FindModifierMask(XKeysymToKeycode(dpy, XK_Num_Lock));
yyparse();
#ifdef DEBUG
DumpProgKeyList();