aboutsummaryrefslogtreecommitdiff
path: root/x11-wm/awesome2/files/extrapatch-warp
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-09-27 23:55:09 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-09-27 23:55:09 +0000
commit0b339e8b776c5a76942f20b97a037709499f0312 (patch)
treee3508df93668eaceed81862b73c23d09cbfc94ad /x11-wm/awesome2/files/extrapatch-warp
parent0b5ac0cdade646cd488e81e39423b78a3c450ac8 (diff)
Notes
Diffstat (limited to 'x11-wm/awesome2/files/extrapatch-warp')
-rw-r--r--x11-wm/awesome2/files/extrapatch-warp25
1 files changed, 25 insertions, 0 deletions
diff --git a/x11-wm/awesome2/files/extrapatch-warp b/x11-wm/awesome2/files/extrapatch-warp
new file mode 100644
index 000000000000..47b1d2dd41cd
--- /dev/null
+++ b/x11-wm/awesome2/files/extrapatch-warp
@@ -0,0 +1,25 @@
+--- layout.c.orig 2007-09-26 13:18:33.000000000 +0300
++++ layout.c 2007-09-26 13:20:48.000000000 +0300
+@@ -114,6 +114,22 @@
+ Client *c;
+ XEvent ev;
+ XWindowChanges wc;
++ Window dummy, root;
++ int wex, wey, ex, ey, i, dummyscno;
++ unsigned int dmask;
++
++ if(sel) {
++ ScreenInfo *si = get_screen_info(disp, awesomeconf->screen, awesomeconf->statusbar, &dummyscno);
++ root = RootWindow(disp, awesomeconf->screen);
++ XQueryPointer(disp, sel->win, &dummy, &dummy, &i, &i, &wex, &wey, &dmask);
++ XTranslateCoordinates(disp, sel->win, root, wex, wey, &ex, &ey, &dummy);
++ /* I'm so sorry for this... Shame on me... */
++ if(ex > si[awesomeconf->screen].x_org && ex < si[awesomeconf->screen].width && ey > si[awesomeconf->screen].y_org && ey < si[awesomeconf->screen].height) {
++ XSelectInput(disp, root, SubstructureRedirectMask & EnterWindowMask);
++ XWarpPointer(disp, None, sel->win, 0, 0, 0, 0, sel->w / 2, sel->h / 2);
++ XSelectInput(disp, root, SubstructureRedirectMask);
++ }
++ }
+
+ drawstatusbar(disp, awesomeconf->screen, drawcontext, awesomeconf);
+ if(!sel)