mirror of
https://github.com/swaywm/sway.git
synced 2026-04-25 06:46:24 -04:00
layer_shell: Handle popups through popup descriptor
We tried to synchronize layer shell popups with the parent layer shell on commits, but this is subtly wrong because we would only update the position for one layer shell that was committed, but not any other layer that might be affected. By moving handling to the scene descriptor we can iterate all popups and ensure they are synchronized.
This commit is contained in:
parent
1846944f04
commit
09c360d503
4 changed files with 18 additions and 13 deletions
|
|
@ -612,13 +612,9 @@ void arrange_popups(struct wlr_scene_tree *popups) {
|
|||
struct sway_popup_desc *popup = scene_descriptor_try_get(node,
|
||||
SWAY_SCENE_DESC_POPUP);
|
||||
|
||||
// the popup layer may have popups from layer_shell surfaces, in this
|
||||
// case those don't have a scene descriptor, so lets skip those here.
|
||||
if (popup) {
|
||||
int lx, ly;
|
||||
wlr_scene_node_coords(popup->relative, &lx, &ly);
|
||||
wlr_scene_node_set_position(node, lx, ly);
|
||||
}
|
||||
int lx, ly;
|
||||
wlr_scene_node_coords(popup->relative, &lx, &ly);
|
||||
wlr_scene_node_set_position(node, lx, ly);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue