diff options
| author | novenary <novenary@kwak.zip> | 2023-12-28 23:28:27 +0200 |
|---|---|---|
| committer | Alexander Orzechowski <alex@ozal.ski> | 2024-07-03 11:00:30 -0400 |
| commit | 5233a0bd2ef84ab6d1eeb2ebcde3d0c73794cdb9 (patch) | |
| tree | 4d0bb0fde029fffaade2d4ef684c3f28062288ea | |
| parent | a0a078f75e977bff85ba6723fe54a4e982e9df52 (diff) | |
ipc: properly check for titlebars
This fixes incorrect values for rect.y when using
`hide_edge_borders --i3`.
| -rw-r--r-- | sway/ipc-json.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 1ee39124..91e31a29 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -578,9 +578,10 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object bool visible = view_is_visible(c->view); json_object_object_add(object, "visible", json_object_new_boolean(visible)); + bool has_titlebar = c->title_bar.tree->node.enabled; struct wlr_box window_box = { c->pending.content_x - c->pending.x, - (c->current.border == B_PIXEL) ? c->pending.content_y - c->pending.y : 0, + has_titlebar ? 0 : c->pending.content_y - c->pending.y, c->pending.content_width, c->pending.content_height }; |
