diff options
| -rw-r--r-- | openbox/moveresize.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 586484ab..315c93f7 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -382,10 +382,14 @@ static void do_move(gboolean keyboard, gint keydist) screen_pointer_pos(&x, &y); - const Rect* a = screen_physical_area_active(); + const Rect* a = screen_physical_area_all_monitors(); gint h = RECT_BOTTOM(*a) - RECT_TOP(*a); gint w = RECT_RIGHT(*a) - RECT_LEFT(*a); + const Rect* cur_a = screen_physical_area_active(); + gint a_h = RECT_BOTTOM(*cur_a) - RECT_TOP(*cur_a); + gint a_w = RECT_RIGHT(*cur_a) - RECT_LEFT(*cur_a); + if (moveresize_client->max_horz && moveresize_client->max_vert && y > 0) { client_maximize(moveresize_client, FALSE, 0); @@ -437,12 +441,12 @@ static void do_move(gboolean keyboard, gint keydist) if (moveresize_client->snapped_left) { cur_x = 0; cur_y = 0; - cur_w = (w / 2) - 1; + cur_w = (a_w / 2) - 1; } else if (moveresize_client->snapped_right) { - cur_x = w / 2; + cur_x = w - a_w / 2; cur_y = 0; - cur_w = w / 2; + cur_w = a_w / 2; } client_configure(moveresize_client, cur_x, cur_y, cur_w, cur_h, |
