[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Tue, 2 Aug 2011 23:35:38 +0200 (CEST)

changeset: 753:41523584f224
tag: tip
user: Pascal Wittmann <mail_AT_pascal-wittmann.de>
date: Tue Aug 02 23:36:56 2011 +0200
files: tools.suckless.org/dmenu/patches/dmenu-4.4-follow-focus.diff tools.suckless.org/dmenu/patches/follow-focus.md
description:
added 'follow input focus' patch for dmenu


diff -r 8a113358f029 -r 41523584f224 tools.suckless.org/dmenu/patches/dmenu-4.4-follow-focus.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools.suckless.org/dmenu/patches/dmenu-4.4-follow-focus.diff Tue Aug 02 23:36:56 2011 +0200
_AT_@ -0,0 +1,21 @@
+diff -r f6b31468f983 dmenu.c
+--- a/dmenu.c Sun Jul 24 20:04:58 2011 +0100
++++ b/dmenu.c Tue Aug 02 23:22:00 2011 +0200
+_AT_@ -492,11 +492,14 @@
+ mh = (lines + 1) * bh;
+ #ifdef XINERAMA
+ if((info = XineramaQueryScreens(dc->dpy, &n))) {
+- int i, di;
+- unsigned int du;
++ int i, revert;
+ Window dw;
++ XWindowAttributes wa;
++ Window chi;
+
+- XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du);
++ XGetInputFocus(dc->dpy, &dw, &revert);
++ XGetWindowAttributes(dc->dpy, dw, &wa);
++ XTranslateCoordinates(dc->dpy, wa.root, wa.root, wa.x, wa.y, &x, &y, &chi);
+ for(i = 0; i < n-1; i++)
+ if(INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))
+ break;
diff -r 8a113358f029 -r 41523584f224 tools.suckless.org/dmenu/patches/follow-focus.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools.suckless.org/dmenu/patches/follow-focus.md Tue Aug 02 23:36:56 2011 +0200
_AT_@ -0,0 +1,12 @@
+FOLLOW INPUT FOCUS
+==================
+
+With this patch dmenu will show up on the monitor which has input focus.
+
+Download
+--------
+* [dmenu-4.4-follow-focus.diff](dmenu-4.4-follow-focus.diff)
+
+Author
+------
+* Pascal Wittmann - <mail_AT_pascal-wittmann.de>
Received on Tue Aug 02 2011 - 23:35:38 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:31:48 CEST