[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Misc patches (back?)ported from dwm
Hi Nikos,
At 1191709827 time_t, Nikos Ntarmos wrote:
> --- extrapatch-warp begins here ---
> --- 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;
> + unsigned int dmask;
> +
> + if(sel) {
> + ScreenInfo *si = get_screen_info(disp, awesomeconf->screen, &awesomeconf->statusbar);
> + 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);
> + }
> + }
I just don't get why you're not just useWarpPointer here?
Cheers,
--
Julien Danjou
// ᐰ <julien@xxxxxxxxxxx> http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD
--
To unsubscribe, send mail to awesome-unsubscribe@xxxxxxxxxxxxx