stop centering mouse on move, just keep current coords
This commit is contained in:
parent
6fae35349a
commit
360f96b5fd
7
client.c
7
client.c
|
@ -442,8 +442,11 @@ client_resize(Client *c, int x, int y, int w, int h, awesome_config *awesomeconf
|
||||||
{
|
{
|
||||||
c->rx = c->x;
|
c->rx = c->x;
|
||||||
c->ry = c->y;
|
c->ry = c->y;
|
||||||
c->rw = c->w;
|
if (c->w != w || c->h != h)
|
||||||
c->rh = c->h;
|
{
|
||||||
|
c->rw = c->w;
|
||||||
|
c->rh = c->h;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
wc.border_width = c->border;
|
wc.border_width = c->border;
|
||||||
XConfigureWindow(c->display, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
|
XConfigureWindow(c->display, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
|
||||||
|
|
3
event.c
3
event.c
|
@ -55,7 +55,6 @@ movemouse(Client *c, awesome_config *awesomeconf)
|
||||||
if(XGrabPointer(c->display, RootWindow(c->display, c->phys_screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
if(XGrabPointer(c->display, RootWindow(c->display, c->phys_screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||||
None, awesomeconf[c->screen].cursor[CurMove], CurrentTime) != GrabSuccess)
|
None, awesomeconf[c->screen].cursor[CurMove], CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
XWarpPointer(c->display, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
|
|
||||||
XQueryPointer(c->display, RootWindow(c->display, c->phys_screen), &dummy, &dummy, &x1, &y1, &di, &di, &dui);
|
XQueryPointer(c->display, RootWindow(c->display, c->phys_screen), &dummy, &dummy, &x1, &y1, &di, &di, &dui);
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
@ -206,7 +205,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
|
||||||
if((get_current_layout(awesomeconf[c->screen].tags,
|
if((get_current_layout(awesomeconf[c->screen].tags,
|
||||||
awesomeconf[c->screen].ntags)->arrange != layout_floating)
|
awesomeconf[c->screen].ntags)->arrange != layout_floating)
|
||||||
&& !c->isfloating)
|
&& !c->isfloating)
|
||||||
uicb_togglefloating(&awesomeconf[c->screen], NULL);
|
uicb_togglefloating(&awesomeconf[c->screen], "DUMMY");
|
||||||
else
|
else
|
||||||
restack(&awesomeconf[c->screen]);
|
restack(&awesomeconf[c->screen]);
|
||||||
movemouse(c, awesomeconf);
|
movemouse(c, awesomeconf);
|
||||||
|
|
5
tag.c
5
tag.c
|
@ -177,7 +177,10 @@ uicb_togglefloating(awesome_config * awesomeconf,
|
||||||
|
|
||||||
sel->isfloating = !sel->isfloating;
|
sel->isfloating = !sel->isfloating;
|
||||||
|
|
||||||
client_resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, awesomeconf, True, False);
|
if (arg == NULL)
|
||||||
|
client_resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, awesomeconf, True, False);
|
||||||
|
else
|
||||||
|
client_resize(sel, sel->x, sel->y, sel->w, sel->h, awesomeconf, True, True);
|
||||||
|
|
||||||
client_untab(sel);
|
client_untab(sel);
|
||||||
saveprops(sel, awesomeconf->ntags);
|
saveprops(sel, awesomeconf->ntags);
|
||||||
|
|
Loading…
Reference in New Issue