diff options
author | Michael Cardell Widerkrantz <mc@hack.org> | 2011-06-01 07:06:27 +0200 |
---|---|---|
committer | Michael Cardell Widerkrantz <mc@hack.org> | 2011-06-01 07:06:27 +0200 |
commit | 9d7112dc6f9b179ee44e5b47453173160e0f14fd (patch) | |
tree | b94218606f4c1e5a4109f9ea62572384e8b7a05a | |
parent | 191c260a06c8d8c40d2acd9e46f0e601037e723a (diff) | |
download | mcwm-9d7112dc6f9b179ee44e5b47453173160e0f14fd.zip |
Moving to corners must change client's coords.
-rw-r--r-- | mcwm.c | 48 |
1 files changed, 18 insertions, 30 deletions
@@ -2684,8 +2684,10 @@ void topleft(void) { return; } - - movewindow(focuswin->id, mon_x, mon_y); + + focuswin->x = mon_x; + focuswin->y = mon_y; + movewindow(focuswin->id, focuswin->x, focuswin->y); xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0, pointx, pointy); xcb_flush(conn); @@ -2730,8 +2732,10 @@ void topright(void) return; } - movewindow(focuswin->id, mon_width - - (width + BORDERWIDTH * 2), mon_y); + focuswin->x = mon_width - (width + BORDERWIDTH * 2); + focuswin->y = mon_y; + + movewindow(focuswin->id, focuswin->x, focuswin->y); xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0, pointx, pointy); @@ -2741,10 +2745,6 @@ void topright(void) void botleft(void) { - int16_t x; - int16_t y; - uint16_t width; - uint16_t height; int16_t pointx; int16_t pointy; int16_t mon_x; @@ -2775,14 +2775,11 @@ void botleft(void) { return; } - - if (!getgeom(focuswin->id, &x, &y, &width, &height)) - { - return; - } - - movewindow(focuswin->id, mon_x, mon_y + mon_height - - (height + BORDERWIDTH * 2)); + + focuswin->x = mon_x; + focuswin->y = mon_y + mon_height - (focuswin->height + BORDERWIDTH * 2); + + movewindow(focuswin->id, focuswin->x, focuswin->y); xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0, pointx, pointy); @@ -2791,10 +2788,6 @@ void botleft(void) void botright(void) { - int16_t x; - int16_t y; - uint16_t width; - uint16_t height; int16_t pointx; int16_t pointy; int16_t mon_x; @@ -2828,17 +2821,12 @@ void botright(void) { return; } + + focuswin->x = mon_x + mon_width - (focuswin->width + BORDERWIDTH * 2); + + focuswin->y = mon_y + mon_height - (focuswin->height + BORDERWIDTH * 2); - if (!getgeom(focuswin->id, &x, &y, &width, &height)) - { - return; - } - - movewindow(focuswin->id, - mon_x + mon_width - - (width + BORDERWIDTH * 2), - mon_y + mon_height - - (height + BORDERWIDTH * 2)); + movewindow(focuswin->id, focuswin->x, focuswin->y); xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0, pointx, pointy); |