aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Alexander Orzechowski <alex@ozal.ski>2024-01-23 10:17:37 -0500
committerLibravatar Kirill Primak <vyivel@eclair.cafe>2024-02-12 19:19:22 +0300
commit09c360d503eb7309de46af3745001df7dd911438 (patch)
treed69bb2e93c2a241b14f5a2140420535a15b4e75d /include
parentxdg_shell: Extract struct for popup descriptor (diff)
downloadsway-09c360d503eb7309de46af3745001df7dd911438.tar.gz
sway-09c360d503eb7309de46af3745001df7dd911438.tar.zst
sway-09c360d503eb7309de46af3745001df7dd911438.zip
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 @@
3#include <stdbool.h> 3#include <stdbool.h>
4#include <wlr/types/wlr_compositor.h> 4#include <wlr/types/wlr_compositor.h>
5#include <wlr/types/wlr_layer_shell_v1.h> 5#include <wlr/types/wlr_layer_shell_v1.h>
6#include "sway/tree/view.h"
6 7
7struct sway_layer_surface { 8struct sway_layer_surface {
8 struct wl_listener map; 9 struct wl_listener map;
@@ -14,10 +15,12 @@ struct sway_layer_surface {
14 15
15 bool mapped; 16 bool mapped;
16 17
18 struct wlr_scene_tree *popups;
19 struct sway_popup_desc desc;
20
17 struct sway_output *output; 21 struct sway_output *output;
18 struct wlr_scene_layer_surface_v1 *scene; 22 struct wlr_scene_layer_surface_v1 *scene;
19 struct wlr_scene_tree *tree; 23 struct wlr_scene_tree *tree;
20 struct wlr_scene_tree *popups;
21 struct wlr_layer_surface_v1 *layer_surface; 24 struct wlr_layer_surface_v1 *layer_surface;
22}; 25};
23 26