mirror of
https://github.com/swaywm/sway.git
synced 2025-11-28 07:00:00 -05:00
Store geometry in the view and handle any floating view resizing
This commit is contained in:
parent
4e755c4b12
commit
b0a5f3a25f
11 changed files with 144 additions and 112 deletions
|
|
@ -22,3 +22,21 @@ void desktop_damage_whole_container(struct sway_container *con) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void desktop_damage_box(struct wlr_box *box) {
|
||||
for (int i = 0; i < root_container.children->length; ++i) {
|
||||
struct sway_container *cont = root_container.children->items[i];
|
||||
output_damage_box(cont->sway_output, box);
|
||||
}
|
||||
}
|
||||
|
||||
void desktop_damage_view(struct sway_view *view) {
|
||||
desktop_damage_whole_container(view->swayc);
|
||||
struct wlr_box box = {
|
||||
.x = view->swayc->current.view_x - view->geometry.x,
|
||||
.y = view->swayc->current.view_y - view->geometry.y,
|
||||
.width = view->surface->current.width,
|
||||
.height = view->surface->current.height,
|
||||
};
|
||||
desktop_damage_box(&box);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue