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.
This commit is contained in:
S. Christoffer Eliesen 2015-12-20 12:49:11 +01:00
parent 6db0f6f80f
commit e45fd9b6c5
4 changed files with 26 additions and 9 deletions

View file

@ -14,10 +14,13 @@ struct background_config {
};
struct panel_config {
// wayland resource used in callbacks, is used to track this panel
struct wl_resource *wl_resource;
wlc_handle output;
wlc_resource surface;
// we need the wl_resource of the surface in the destructor
struct wl_resource *wl_surface_res;
enum desktop_shell_panel_position panel_position;
};
struct desktop_shell_state {
@ -25,7 +28,6 @@ struct desktop_shell_state {
list_t *panels;
list_t *lock_surfaces;
bool is_locked;
enum desktop_shell_panel_position panel_position;
struct wlc_size panel_size;
};