mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
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.
This commit is contained in:
parent
1b27e8c8fd
commit
fadfbe8dba
1 changed files with 1 additions and 1 deletions
|
@ -577,7 +577,7 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
|
||||||
|
|
||||||
struct wlr_box window_box = {
|
struct wlr_box window_box = {
|
||||||
c->pending.content_x - c->pending.x,
|
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_width,
|
||||||
c->pending.content_height
|
c->pending.content_height
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue