Is the pointer inside client with including the borders...
it didn't reshift the pointer when the pointer was on the right border (or even somebit in the client) because it didn't calculate the border with to the dimensions. Also, it wrapped the pointer inside the client. now it leaves it on the border when that was the case before. Or on resizing (smaller) the pointer might also move (relativ to the client) to the most outside point of the left or top border. There is still the problem so: the client gets moved/resize, the pointer might get out of the area temprarly and the client loses the focus - despite that the pointer will reshifted onto it again. A general: client_focus(sel, screen, False); at the end seems to help, but is probably not clean etc. Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8b8fc8148f
commit
317929baea
13
client.c
13
client.c
|
@ -830,14 +830,17 @@ uicb_client_moveresize(int screen, char *arg)
|
|||
get_phys_screen(screen)),
|
||||
&dummy, &dummy, &mx, &my, &dx, &dy, &dui);
|
||||
client_resize(sel, area, globalconf.screens[sel->screen].resize_hints);
|
||||
if (xqp && ox <= mx && (ox + ow) >= mx && oy <= my && (oy + oh) >= my)
|
||||
if (xqp && ox <= mx && (ox + 2 * sel->border + ow) >= mx &&
|
||||
oy <= my && (oy + 2 * sel->border + oh) >= my)
|
||||
{
|
||||
nmx = mx - (ox + sel->border) + sel->geometry.width - ow;
|
||||
if(nmx < 0)
|
||||
nmx = 0;
|
||||
nmy = my - (oy + sel->border) + sel->geometry.height - oh;
|
||||
if(nmy < 0)
|
||||
nmy = 0;
|
||||
|
||||
if(nmx < -sel->border) /* can happen on a resize */
|
||||
nmx = -sel->border;
|
||||
if(nmy < -sel->border)
|
||||
nmy = -sel->border;
|
||||
|
||||
XWarpPointer(globalconf.display,
|
||||
None, sel->win,
|
||||
0, 0, 0, 0, nmx, nmy);
|
||||
|
|
Loading…
Reference in New Issue