From 703aeecb9547fa386c0780d991910793d101d870 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 11 Jul 2019 17:02:21 +0200 Subject: selection: add support for pasting *from* primary --- terminal.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 4d73f998..9af18d7e 100644 --- a/terminal.h +++ b/terminal.h @@ -8,9 +8,11 @@ #include #include +#include #include #include + #include "tllist.h" #define likely(c) __builtin_expect(!!(c), 1) @@ -25,6 +27,8 @@ struct wayland { struct wl_seat *seat; struct wl_data_device_manager *data_device_manager; struct wl_data_device *data_device; + struct zwp_primary_selection_device_manager_v1 *primary_selection_device_manager; + struct zwp_primary_selection_device_v1 *primary_selection_device; struct wl_keyboard *keyboard; struct { struct wl_pointer *pointer; @@ -193,6 +197,13 @@ struct clipboard { uint32_t serial; }; +struct primary { + struct zwp_primary_selection_source_v1 *data_source; + struct zwp_primary_selection_offer_v1 *data_offer; + char *text; + uint32_t serial; +}; + struct terminal { pid_t slave; int ptmx; @@ -240,8 +251,8 @@ struct terminal { struct { struct coord start; struct coord end; - struct clipboard primary; struct clipboard clipboard; + struct primary primary; } selection; struct grid normal; -- cgit v1.3