summaryrefslogtreecommitdiffstats
path: root/include/extensions.h
diff options
context:
space:
mode:
authorLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-12-20 12:49:11 +0100
committerLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-12-20 12:54:34 +0100
commite45fd9b6c5dfb858c6f86277351bc216574d8200 (patch)
tree8d70e85b1e1f1dcca401429c95b9b8ee9bde8890 /include/extensions.h
parentextensions: panel_config->resource => wl_surface_res. (diff)
downloadsway-e45fd9b6c5dfb858c6f86277351bc216574d8200.tar.gz
sway-e45fd9b6c5dfb858c6f86277351bc216574d8200.tar.zst
sway-e45fd9b6c5dfb858c6f86277351bc216574d8200.zip
extensions: Track panels by wl_resource, position per panel.
Track each panel separately via its wl_resource. `set_panel_position` might be called before `set_panel`, so reuse panel config. Place the position in panel_config so that each panel has its own position.
Diffstat (limited to 'include/extensions.h')
-rw-r--r--include/extensions.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/extensions.h b/include/extensions.h
index 67c7d5fe..164688ee 100644
--- a/include/extensions.h
+++ b/include/extensions.h
@@ -14,10 +14,13 @@ struct background_config {
14}; 14};
15 15
16struct panel_config { 16struct panel_config {
17 // wayland resource used in callbacks, is used to track this panel
18 struct wl_resource *wl_resource;
17 wlc_handle output; 19 wlc_handle output;
18 wlc_resource surface; 20 wlc_resource surface;
19 // we need the wl_resource of the surface in the destructor 21 // we need the wl_resource of the surface in the destructor
20 struct wl_resource *wl_surface_res; 22 struct wl_resource *wl_surface_res;
23 enum desktop_shell_panel_position panel_position;
21}; 24};
22 25
23struct desktop_shell_state { 26struct desktop_shell_state {
@@ -25,7 +28,6 @@ struct desktop_shell_state {
25 list_t *panels; 28 list_t *panels;
26 list_t *lock_surfaces; 29 list_t *lock_surfaces;
27 bool is_locked; 30 bool is_locked;
28 enum desktop_shell_panel_position panel_position;
29 struct wlc_size panel_size; 31 struct wlc_size panel_size;
30}; 32};
31 33