Skip to content

Commit

Permalink
Add border_width to window coordinates
Browse files Browse the repository at this point in the history
Normalize the geometry between reparenting and non- window managers.
  • Loading branch information
ortango committed Mar 27, 2024
1 parent 9fcfcfb commit 8b5c572
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/xcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,13 @@ static int monitor_active_from_id_focused(int mon_id, workarea *mon) {
// place the menu above the window
// if some window is focused, place menu above window, else fall
// back to selected monitor.
mon->x = t->dst_x - r->x + r->border_width;
mon->y = t->dst_y - r->y + r->border_width;
if (tree_reply->parent == r->root) {
mon->x = t->dst_x - r->x + r->border_width;
mon->y = t->dst_y - r->y + r->border_width;
} else {
mon->x = t->dst_x;
mon->y = t->dst_y;
}
mon->w = r->width;
mon->h = r->height;
retv = TRUE;
Expand Down

0 comments on commit 8b5c572

Please sign in to comment.