mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-03 07:15:29 -04:00
selection: add support for pasting *from* primary
This commit is contained in:
parent
e56066feef
commit
703aeecb95
5 changed files with 124 additions and 6 deletions
13
terminal.h
13
terminal.h
|
|
@ -8,9 +8,11 @@
|
|||
|
||||
#include <cairo.h>
|
||||
#include <wayland-client.h>
|
||||
#include <primary-selection-unstable-v1.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include <xkbcommon/xkbcommon-keysyms.h>
|
||||
|
||||
|
||||
#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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue