diff options
author | emersion <contact@emersion.fr> | 2018-03-15 20:15:09 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-15 20:15:09 +0100 |
commit | e607d0f7ee00c59354c996fc98e738c26adbca58 (patch) | |
tree | 320244e9ea613f9c3192b946141de02159dca169 /include | |
parent | 42cc575266b3fb2bb406145d0553e375d17b038a (diff) |
xdg-shell: add map/unmap support
Diffstat (limited to 'include')
-rw-r--r-- | include/rootston/view.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_xdg_shell.h | 33 |
2 files changed, 15 insertions, 20 deletions
diff --git a/include/rootston/view.h b/include/rootston/view.h index 92d1feb5..775f3d11 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -44,6 +44,8 @@ struct roots_xdg_surface { struct wl_listener destroy; struct wl_listener new_popup; + struct wl_listener map; + struct wl_listener unmap; struct wl_listener request_move; struct wl_listener request_resize; struct wl_listener request_maximize; diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 8422863c..ad0a626f 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -62,19 +62,10 @@ enum wlr_xdg_surface_role { }; struct wlr_xdg_toplevel_state { - bool maximized; - bool fullscreen; - bool resizing; - bool activated; - - uint32_t width; - uint32_t height; - - uint32_t max_width; - uint32_t max_height; - - uint32_t min_width; - uint32_t min_height; + bool maximized, fullscreen, resizing, activated; + uint32_t width, height; + uint32_t max_width, max_height; + uint32_t min_width, min_height; }; struct wlr_xdg_toplevel { @@ -90,7 +81,8 @@ struct wlr_xdg_toplevel { struct wlr_xdg_surface_configure { struct wl_list link; // wlr_xdg_surface::configure_list uint32_t serial; - struct wlr_xdg_toplevel_state state; + + struct wlr_xdg_toplevel_state *toplevel_state; }; struct wlr_xdg_surface { @@ -101,14 +93,13 @@ struct wlr_xdg_surface { enum wlr_xdg_surface_role role; union { - struct wlr_xdg_toplevel *toplevel_state; - struct wlr_xdg_popup *popup_state; + struct wlr_xdg_toplevel *toplevel; + struct wlr_xdg_popup *popup; }; struct wl_list popups; // wlr_xdg_popup::link - bool configured; - bool added; + bool added, configured, mapped; uint32_t configure_serial; struct wl_event_source *configure_idle; uint32_t configure_next_serial; @@ -118,8 +109,8 @@ struct wlr_xdg_surface { char *app_id; bool has_next_geometry; - struct wlr_box *next_geometry; - struct wlr_box *geometry; + struct wlr_box next_geometry; + struct wlr_box geometry; struct wl_listener surface_destroy_listener; @@ -127,6 +118,8 @@ struct wlr_xdg_surface { struct wl_signal destroy; struct wl_signal ping_timeout; struct wl_signal new_popup; + struct wl_signal map; + struct wl_signal unmap; struct wl_signal request_maximize; struct wl_signal request_fullscreen; |