diff options
Diffstat (limited to 'openbox/moveresize.c')
| -rw-r--r-- | openbox/moveresize.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 0cdf267d..0f9db110 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -27,6 +27,7 @@ #include "resist.h" #include "popup.h" #include "moveresize.h" +#include "tiling.h" #include "config.h" #include "event.h" #include "debug.h" @@ -266,6 +267,8 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr) cur_h = start_ch; moveresize_in_progress = TRUE; + if (!moving) + tiling_resize_begin(c); waiting_for_sync = 0; #ifdef SYNC @@ -367,6 +370,10 @@ void moveresize_end(gboolean cancel) cancel_edge_warp(); moveresize_in_progress = FALSE; + if (moving) + tiling_move_end(moveresize_client, cancel); + else + tiling_resize_end(moveresize_client, cancel); moveresize_client = NULL; } @@ -382,6 +389,14 @@ static void do_move(gboolean keyboard, gint keydist) screen_pointer_pos(&x, &y); + if (tiling_move_preview(moveresize_client, + keyboard ? cur_x + cur_w / 2 : x, + keyboard ? cur_y + cur_h / 2 : y)) { + client_configure(moveresize_client, cur_x, cur_y, cur_w, cur_h, + TRUE, FALSE, FALSE); + return; + } + const Rect* a = screen_physical_area_all_monitors(); gint h = RECT_BOTTOM(*a) - RECT_TOP(*a); gint w = RECT_RIGHT(*a) - RECT_LEFT(*a); @@ -461,6 +476,8 @@ static void do_resize(void) { gint x, y, w, h, lw, lh; + tiling_resize_adjust(moveresize_client, &cur_x, &cur_y, &cur_w, &cur_h); + /* see if it is actually going to resize USE cur_x AND cur_y HERE ! Otherwise the try_configure won't know what struts to use !! |
