diff --git a/client.c b/client.c index 3c38d47db..9b1a3aa0b 100644 --- a/client.c +++ b/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->ry = c->y; - c->rw = c->w; - c->rh = c->h; + 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); diff --git a/event.c b/event.c index f7a07db04..cf76bdac6 100644 --- a/event.c +++ b/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, 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); diff --git a/tag.c b/tag.c index b2ee623a9..1bf9efa0d 100644 --- a/tag.c +++ b/tag.c @@ -177,7 +177,10 @@ uicb_togglefloating(awesome_config * awesomeconf, 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); saveprops(sel, awesomeconf->ntags);