diff options
author | Ćukasz Adamczak <14021+czak@users.noreply.github.com> | 2023-02-05 14:54:09 +0100 |
---|---|---|
committer | Ronan Pigott <ronan@rjp.ie> | 2023-02-10 11:17:50 -0700 |
commit | fadfbe8dbae4b3a840cc05fcfe67d74f5050a878 (patch) | |
tree | eded9c8792b0f4a7971cd164b6d51cb7f02199ab | |
parent | xdg-activation: fix urgency when the client does not specify a seat (diff) | |
download | sway-fadfbe8dbae4b3a840cc05fcfe67d74f5050a878.tar.gz sway-fadfbe8dbae4b3a840cc05fcfe67d74f5050a878.tar.zst sway-fadfbe8dbae4b3a840cc05fcfe67d74f5050a878.zip |
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.
-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 8aa9557e..51e6a995 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -577,7 +577,7 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object | |||
577 | 577 | ||
578 | struct wlr_box window_box = { | 578 | struct wlr_box window_box = { |
579 | c->pending.content_x - c->pending.x, | 579 | c->pending.content_x - c->pending.x, |
580 | (c->current.border == B_PIXEL) ? c->current.border_thickness : 0, | 580 | (c->current.border == B_PIXEL) ? c->pending.content_y - c->pending.y : 0, |
581 | c->pending.content_width, | 581 | c->pending.content_width, |
582 | c->pending.content_height | 582 | c->pending.content_height |
583 | }; | 583 | }; |