Skip to content

Commit

Permalink
do proper rounding before calling AX to set the frame
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixKratz committed Sep 1, 2022
1 parent db7d89d commit 951de7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/window_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,10 @@ void window_manager_set_window_frame(struct window *window, float x, float y, fl
// in our event-handlers for both the window move and resize-notifications.
//

x = (int)(x + 1);
y = (int)(y + 1);
width = (int)(width + 1);
height = (int)(height + 1);
bool should_move = !(window->frame.origin.x == x && window->frame.origin.y == y);
bool should_resize = !(window->frame.size.width == width && window->frame.size.height == height);
if (!should_move && !should_resize) return;
Expand Down

0 comments on commit 951de7e

Please sign in to comment.