aboutsummaryrefslogtreecommitdiff
path: root/wayland.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-10-27 15:15:32 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-10-27 15:15:32 +0000
commit5ca1ee701bc4297180fa9c248d9f8810ef82550c (patch)
tree89eed45b45ca6b0233bde223d5cb852ca7f7fe64 /wayland.c
parentwayland: implement wayl_win_destroy() (diff)
wayland: move clipboard/primary structs into the wayland struct
These are application global and very wayland specific
Diffstat (limited to 'wayland.c')
-rw-r--r--wayland.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wayland.c b/wayland.c
index 9b00f5bb..96ba3641 100644
--- a/wayland.c
+++ b/wayland.c
@@ -34,6 +34,17 @@ wayl_destroy(struct wayland *wayl)
if (wayl->xdg_output_manager != NULL)
zxdg_output_manager_v1_destroy(wayl->xdg_output_manager);
+ if (wayl->clipboard.data_source != NULL)
+ wl_data_source_destroy(wayl->clipboard.data_source);
+ if (wayl->clipboard.data_offer != NULL)
+ wl_data_offer_destroy(wayl->clipboard.data_offer);
+ free(wayl->clipboard.text);
+ if (wayl->primary.data_source != NULL)
+ zwp_primary_selection_source_v1_destroy(wayl->primary.data_source);
+ if (wayl->primary.data_offer != NULL)
+ zwp_primary_selection_offer_v1_destroy(wayl->primary.data_offer);
+ free(wayl->primary.text);
+
free(wayl->pointer.theme_name);
if (wayl->pointer.theme != NULL)
wl_cursor_theme_destroy(wayl->pointer.theme);