aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2022-03-05 19:32:35 +0300
committerSimon Ser <contact@emersion.fr>2022-05-27 13:31:30 +0000
commit4a968576e44240b447330c848d6cd624d2a27c62 (patch)
tree8e7a8b424273ffab6b52b86a5d3dab02dc4cf2b7 /include
parent4f5d6e474635ee75d57650e4f1ae0926011c1263 (diff)
xdg-popup: add proper configure flow
Diffstat (limited to 'include')
-rw-r--r--include/types/wlr_xdg_shell.h4
-rw-r--r--include/wlr/types/wlr_xdg_shell.h14
2 files changed, 15 insertions, 3 deletions
diff --git a/include/types/wlr_xdg_shell.h b/include/types/wlr_xdg_shell.h
index cfed6ee1..37ef2a95 100644
--- a/include/types/wlr_xdg_shell.h
+++ b/include/types/wlr_xdg_shell.h
@@ -26,6 +26,10 @@ void create_xdg_popup(struct wlr_xdg_surface *surface,
void unmap_xdg_popup(struct wlr_xdg_popup *popup);
void destroy_xdg_popup(struct wlr_xdg_popup *popup);
void handle_xdg_popup_committed(struct wlr_xdg_popup *popup);
+struct wlr_xdg_popup_configure *send_xdg_popup_configure(
+ struct wlr_xdg_popup *popup);
+void handle_xdg_popup_ack_configure(struct wlr_xdg_popup *popup,
+ struct wlr_xdg_popup_configure *configure);
void create_xdg_toplevel(struct wlr_xdg_surface *surface,
uint32_t id);
diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h
index 51ba0584..19378c16 100644
--- a/include/wlr/types/wlr_xdg_shell.h
+++ b/include/wlr/types/wlr_xdg_shell.h
@@ -70,6 +70,11 @@ struct wlr_xdg_positioner {
struct wlr_xdg_positioner_rules rules;
};
+struct wlr_xdg_popup_configure {
+ struct wlr_box geometry;
+ struct wlr_xdg_positioner_rules rules;
+};
+
struct wlr_xdg_popup {
struct wlr_xdg_surface *base;
struct wl_list link;
@@ -79,12 +84,12 @@ struct wlr_xdg_popup {
struct wlr_surface *parent;
struct wlr_seat *seat;
+ struct wlr_xdg_popup_configure scheduled;
+
// Position of the popup relative to the upper left corner of the window
// geometry of the parent surface
struct wlr_box geometry;
- struct wlr_xdg_positioner_rules positioner_rules;
-
struct wl_list grab_link; // wlr_xdg_popup_grab.popups
};
@@ -173,7 +178,10 @@ struct wlr_xdg_surface_configure {
struct wl_list link; // wlr_xdg_surface.configure_list
uint32_t serial;
- struct wlr_xdg_toplevel_configure *toplevel_configure;
+ union {
+ struct wlr_xdg_toplevel_configure *toplevel_configure;
+ struct wlr_xdg_popup_configure *popup_configure;
+ };
};
struct wlr_xdg_surface_state {