Add border_width to window coordinates

Normalize the geometry between reparenting and non- window managers.
This commit is contained in:
ortango 2024-03-27 19:00:56 -04:00 committed by GitHub
parent 9fcfcfbbea
commit 8b5c572a46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -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;