Skip to content

Commit

Permalink
Account for border width in configure requests
Browse files Browse the repository at this point in the history
When moving and/or resizing managed floating windows.

Fixes #863.
Closes #1456.
Babakinha authored and baskerville committed Aug 29, 2023
1 parent 8fc2269 commit af3bd8b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/events.c
Original file line number Diff line number Diff line change
@@ -171,6 +171,9 @@ void configure_request(xcb_generic_event_t *evt)
c->floating_rectangle.height = height;
xcb_rectangle_t r = c->floating_rectangle;

r.x -= c->border_width;
r.y -= c->border_width;

window_move_resize(e->window, r.x, r.y, r.width, r.height);

put_status(SBSC_MASK_NODE_GEOMETRY, "node_geometry 0x%08X 0x%08X 0x%08X %ux%u+%i+%i\n", loc.monitor->id, loc.desktop->id, e->window, r.width, r.height, r.x, r.y);

0 comments on commit af3bd8b

Please sign in to comment.