selection: initial copy-to-clipboard functionality

This commit is contained in:
Daniel Eklöf 2019-07-11 12:16:50 +02:00
parent 1f808781f4
commit b50ec1a850
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 289 additions and 0 deletions

View file

@ -23,6 +23,8 @@ struct wayland {
struct wl_surface *surface;
struct wl_shm *shm;
struct wl_seat *seat;
struct wl_data_device_manager *data_device_manager;
struct wl_data_device *data_device;
struct wl_keyboard *keyboard;
struct {
struct wl_pointer *pointer;
@ -184,6 +186,13 @@ enum mouse_reporting {
MOUSE_URXVT, /* ?1015h */
};
struct clipboard {
struct wl_data_source *data_source;
struct wl_data_offer *data_offer;
char *text;
uint32_t serial;
};
struct terminal {
pid_t slave;
int ptmx;
@ -231,6 +240,8 @@ struct terminal {
struct {
struct coord start;
struct coord end;
struct clipboard primary;
struct clipboard clipboard;
} selection;
struct grid normal;