diff options
author | Orestis Floros <orestisflo@gmail.com> | 2022-09-17 13:00:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-17 13:00:29 +0200 |
commit | 0ac5e248f2ccc3e1989107471603618860616315 (patch) | |
tree | 6272e4b59d8b7b31794ba0f6c0e0fa6dc4a6ea25 | |
parent | 5ce8e3241bf4fc4c3c975209d2e145564f633261 (diff) | |
download | i3-0ac5e248f2ccc3e1989107471603618860616315.tar.gz i3-0ac5e248f2ccc3e1989107471603618860616315.zip |
tiling_drag: con_rect_plus_deco_height: Fix underflow (#5129)
Fixes #5069
-rw-r--r-- | src/tiling_drag.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tiling_drag.c b/src/tiling_drag.c index 83ce63c9..61149072 100644 --- a/src/tiling_drag.c +++ b/src/tiling_drag.c @@ -19,7 +19,11 @@ static xcb_window_t create_drop_indicator(Rect rect); static Rect con_rect_plus_deco_height(Con *con) { Rect rect = con->rect; rect.height += con->deco_rect.height; - rect.y -= con->deco_rect.height; + if (rect.y < con->deco_rect.height) { + rect.y = 0; + } else { + rect.y -= con->deco_rect.height; + } return rect; } |