diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2023-02-05 14:54:09 +0100 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2023-02-05 14:54:09 +0100 |
| commit | 85205b58fa9f872c06800eaf8bc54b6dd6ba873c (patch) | |
| tree | 61f902a4ff839fd9f75ae20e1782e8c51003e6dd | |
| parent | 576c0a4da3c7945dd0ebd1bd2d4126cc215e3501 (diff) | |
Correct window_rect.y with hide_edge_borders
With `hide_edge_borders both` (or at least `vertical`),
`window_rect.y` will equal `border_thickness` for SOME windows,
but it will be 0 for windows adjacent to top screen edge.
Therefore setting it to `border_thickness` is not sufficient.
This commit changes it to the actual y offset of content
into the container.
(cherry picked from commit fadfbe8dbae4b3a840cc05fcfe67d74f5050a878)
| -rw-r--r-- | sway/ipc-json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index d757f21f..cd79e1c8 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -558,7 +558,7 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object struct wlr_box window_box = { c->pending.content_x - c->pending.x, - (c->current.border == B_PIXEL) ? c->current.border_thickness : 0, + (c->current.border == B_PIXEL) ? c->pending.content_y - c->pending.y : 0, c->pending.content_width, c->pending.content_height }; |
