stop centering mouse on move, just keep current coords
This commit is contained in:
parent
6fae35349a
commit
360f96b5fd
3
client.c
3
client.c
|
@ -442,9 +442,12 @@ 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;
|
||||||
|
if (c->w != w || c->h != h)
|
||||||
|
{
|
||||||
c->rw = c->w;
|
c->rw = c->w;
|
||||||
c->rh = c->h;
|
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);
|
||||||
window_configure(c->display, c->win, c->x, c->y, c->w, c->h, c->border);
|
window_configure(c->display, c->win, c->x, c->y, c->w, c->h, c->border);
|
||||||
|
|
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);
|
||||||
|
|
3
tag.c
3
tag.c
|
@ -177,7 +177,10 @@ uicb_togglefloating(awesome_config * awesomeconf,
|
||||||
|
|
||||||
sel->isfloating = !sel->isfloating;
|
sel->isfloating = !sel->isfloating;
|
||||||
|
|
||||||
|
if (arg == NULL)
|
||||||
client_resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, awesomeconf, True, False);
|
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