stop centering mouse on move, just keep current coords

This commit is contained in:
Nikos Ntarmos 2007-11-09 19:22:42 +01:00 committed by Julien Danjou
parent 6fae35349a
commit 360f96b5fd
3 changed files with 10 additions and 5 deletions

View File

@ -442,9 +442,12 @@ client_resize(Client *c, int x, int y, int w, int h, awesome_config *awesomeconf
{
c->rx = c->x;
c->ry = c->y;
if (c->w != w || c->h != h)
{
c->rw = c->w;
c->rh = c->h;
}
}
wc.border_width = c->border;
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);

View File

@ -55,7 +55,6 @@ movemouse(Client *c, awesome_config *awesomeconf)
if(XGrabPointer(c->display, RootWindow(c->display, c->phys_screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, awesomeconf[c->screen].cursor[CurMove], CurrentTime) != GrabSuccess)
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);
for(;;)
{
@ -206,7 +205,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
if((get_current_layout(awesomeconf[c->screen].tags,
awesomeconf[c->screen].ntags)->arrange != layout_floating)
&& !c->isfloating)
uicb_togglefloating(&awesomeconf[c->screen], NULL);
uicb_togglefloating(&awesomeconf[c->screen], "DUMMY");
else
restack(&awesomeconf[c->screen]);
movemouse(c, awesomeconf);

3
tag.c
View File

@ -177,7 +177,10 @@ uicb_togglefloating(awesome_config * awesomeconf,
sel->isfloating = !sel->isfloating;
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);
saveprops(sel, awesomeconf->ntags);