aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2024-01-23 10:17:37 -0500
committerFurkan Sahin <furkan-dev@proton.me>2024-01-23 10:17:37 -0500
commitd48112710609eda125077f9b2b2023da960da112 (patch)
treed69bb2e93c2a241b14f5a2140420535a15b4e75d /include
parentf7b27575a28f7e83322c2c1421caa08de8b57418 (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/sway/layers.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sway/layers.h b/include/sway/layers.h
index a7afb900..fd6384e0 100644
--- a/include/sway/layers.h
+++ b/include/sway/layers.h
@@ -3,6 +3,7 @@
#include <stdbool.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_layer_shell_v1.h>
+#include "sway/tree/view.h"
struct sway_layer_surface {
struct wl_listener map;
@@ -14,10 +15,12 @@ struct sway_layer_surface {
bool mapped;
+ struct wlr_scene_tree *popups;
+ struct sway_popup_desc desc;
+
struct sway_output *output;
struct wlr_scene_layer_surface_v1 *scene;
struct wlr_scene_tree *tree;
- struct wlr_scene_tree *popups;
struct wlr_layer_surface_v1 *layer_surface;
};