0
0
mirror of https://github.com/vim/vim.git synced 2025-10-20 08:14:18 -04:00

patch 9.1.1485: missing Wayland clipboard support

Problem:  missing Wayland clipboard support
Solution: make it work (Foxe Chen)

fixes: #5157
closes: #17097

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Foxe Chen
2025-06-27 21:10:35 +02:00
committed by Christian Brabandt
parent 03125277e9
commit b90c2395b2
68 changed files with 7520 additions and 226 deletions

View File

@@ -4831,7 +4831,7 @@ typedef enum {
#define DELETION_REGISTER 36
#ifdef FEAT_CLIPBOARD
# define STAR_REGISTER 37
# ifdef FEAT_X11
# if defined(FEAT_X11) || defined(FEAT_WAYLAND)
# define PLUS_REGISTER 38
# else
# define PLUS_REGISTER STAR_REGISTER // there is only one
@@ -5187,3 +5187,23 @@ struct cellsize {
int cs_ypixel;
};
#endif
#ifdef FEAT_WAYLAND
// Wayland selections
typedef enum {
WAYLAND_SELECTION_NONE = 0x0,
WAYLAND_SELECTION_REGULAR = 0x1,
WAYLAND_SELECTION_PRIMARY = 0x2,
} wayland_selection_T;
// Callback when another client wants us to send data to them
typedef void (*wayland_cb_send_data_func_T)(
const char *mime_type,
int fd,
wayland_selection_T type);
// Callback when the selection is lost (data source object overwritten)
typedef void (*wayland_cb_selection_cancelled_func_T)(wayland_selection_T type);
#endif // FEAT_WAYLAND