Skip to content

Commit

Permalink
Merge pull request #5378 from slyshot/next
Browse files Browse the repository at this point in the history
Fix top border resizing registered on tiled windows
  • Loading branch information
orestisfl committed May 5, 2023
2 parents fae2b63 + a715c03 commit fde43a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions release-notes/bugfixes/1-top-border-resize
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix top border resizing on tiling windows
5 changes: 4 additions & 1 deletion src/click.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,11 @@ static bool tiling_resize(Con *con, xcb_button_press_event_t *event, const click
DLOG("checks for right >= %d\n", con->window_rect.x + con->window_rect.width);
if (dest == CLICK_DECORATION) {
return tiling_resize_for_border(con, BORDER_TOP, event, use_threshold);
} else if (dest == CLICK_BORDER) {
if (event->event_y >= 0 && event->event_y <= (int32_t)bsr.y &&
event->event_x >= (int32_t)bsr.x && event->event_x <= (int32_t)(con->rect.width + bsr.width))
return tiling_resize_for_border(con, BORDER_TOP, event, false);
}

if (event->event_x >= 0 && event->event_x <= (int32_t)bsr.x &&
event->event_y >= (int32_t)bsr.y && event->event_y <= (int32_t)(con->rect.height + bsr.height))
return tiling_resize_for_border(con, BORDER_LEFT, event, false);
Expand Down

0 comments on commit fde43a0

Please sign in to comment.