mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
Fix incorrect damage being applied on popups
To reproduce: - Open a floating window and a popup that hangs over the bottom or right - Move the window in the direction of the popup overhang - The previous position of the popup is damaged, not the new one
This commit is contained in:
parent
4d43f1dd99
commit
4b2c46ada2
1 changed files with 13 additions and 13 deletions
|
|
@ -238,19 +238,6 @@ static void apply_container_state(struct sway_container *container,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Damage the new location
|
|
||||||
desktop_damage_whole_container(container);
|
|
||||||
if (view && view->surface) {
|
|
||||||
struct wlr_surface *surface = view->surface;
|
|
||||||
struct wlr_box box = {
|
|
||||||
.x = container->current.content_x - view->geometry.x,
|
|
||||||
.y = container->current.content_y - view->geometry.y,
|
|
||||||
.width = surface->current.width,
|
|
||||||
.height = surface->current.height,
|
|
||||||
};
|
|
||||||
desktop_damage_box(&box);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the view hasn't responded to the configure, center it within
|
// If the view hasn't responded to the configure, center it within
|
||||||
// the container. This is important for fullscreen views which
|
// the container. This is important for fullscreen views which
|
||||||
// refuse to resize to the size of the output.
|
// refuse to resize to the size of the output.
|
||||||
|
|
@ -269,6 +256,19 @@ static void apply_container_state(struct sway_container *container,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Damage the new location
|
||||||
|
desktop_damage_whole_container(container);
|
||||||
|
if (view && view->surface) {
|
||||||
|
struct wlr_surface *surface = view->surface;
|
||||||
|
struct wlr_box box = {
|
||||||
|
.x = container->current.content_x - view->geometry.x,
|
||||||
|
.y = container->current.content_y - view->geometry.y,
|
||||||
|
.width = surface->current.width,
|
||||||
|
.height = surface->current.height,
|
||||||
|
};
|
||||||
|
desktop_damage_box(&box);
|
||||||
|
}
|
||||||
|
|
||||||
if (!container->node.destroying) {
|
if (!container->node.destroying) {
|
||||||
container_discover_outputs(container);
|
container_discover_outputs(container);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue