aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-09 06:16:51 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-10 08:39:08 -0400
commit22a16a59ca13863c0017a2c8dfa6e49b26a13744 (patch)
tree35a303527b98baeeacbd482699bb12e9cff4b758 /include/wlr
parentcd1204f71f7222ea896c94bea3194d3b220845be (diff)
wl-shell: basic pointer grab
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_wl_shell.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/wlr/types/wlr_wl_shell.h b/include/wlr/types/wlr_wl_shell.h
index ae30f5c4..162874e9 100644
--- a/include/wlr/types/wlr_wl_shell.h
+++ b/include/wlr/types/wlr_wl_shell.h
@@ -3,11 +3,13 @@
#include <stdbool.h>
#include <wayland-server.h>
+#include <wlr/types/wlr_seat.h>
struct wlr_wl_shell {
struct wl_global *wl_global;
struct wl_list wl_resources;
struct wl_list surfaces;
+ struct wl_list popup_grabs;
uint32_t ping_timeout;
struct {
@@ -24,10 +26,19 @@ struct wlr_wl_shell_surface_transient_state {
};
struct wlr_wl_shell_surface_popup_state {
- struct wlr_seat_handle *seat_handle;
+ struct wlr_seat *seat;
uint32_t serial;
};
+// each seat gets a popup grab
+struct wlr_wl_shell_popup_grab {
+ struct wl_client *client;
+ struct wlr_seat_pointer_grab pointer_grab;
+ struct wlr_seat *seat;
+ struct wl_list popups;
+ struct wl_list link; // wlr_wl_shell::popup_grabs
+};
+
enum wlr_wl_shell_surface_state {
WLR_WL_SHELL_SURFACE_STATE_NONE,
WLR_WL_SHELL_SURFACE_STATE_TOPLEVEL,
@@ -48,6 +59,7 @@ struct wlr_wl_shell_surface {
enum wlr_wl_shell_surface_state state;
struct wlr_wl_shell_surface_transient_state *transient_state;
struct wlr_wl_shell_surface_popup_state *popup_state;
+ struct wl_list grab_link; // wlr_wl_shell_popup_grab::popups
char *title;
char *class;