diff options
| author | navewindre <boneyaard@gmail.com> | 2024-11-12 03:36:00 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2024-11-12 03:36:11 +0100 |
| commit | ba1395cf3abaca07213e3118de9fd81faea1175d (patch) | |
| tree | 34f593ea547db16e6cfe4ade5b488d2276b78231 | |
| parent | 7f12267dfa678a7fecb58bb0efdc165177938e26 (diff) | |
fix not snapping when window not aligned to 0
| -rw-r--r-- | openbox/moveresize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 315c93f7..0cdf267d 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -390,7 +390,7 @@ static void do_move(gboolean keyboard, gint keydist) 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) + if (moveresize_client->max_horz && moveresize_client->max_vert && y > RECT_TOP(*cur_a)) { client_maximize(moveresize_client, FALSE, 0); start_cx = 0; @@ -402,7 +402,7 @@ static void do_move(gboolean keyboard, gint keydist) cur_w = moveresize_client->area.width; cur_h = moveresize_client->area.height; } - else if (y == 0 && !moveresize_client->snapped_left && !moveresize_client->snapped_right) { + else if (y == RECT_TOP(*cur_a) && !moveresize_client->snapped_left && !moveresize_client->snapped_right) { client_maximize(moveresize_client, TRUE, 0); } else if (x == 0 && !moveresize_client->snapped_left && !moveresize_client->max_horz && !moveresize_client->max_vert) { |
