aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r--xwayland/xwm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index fa0522d6..39cd6362 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -43,6 +43,9 @@ const char *atom_map[ATOM_LAST] = {
"_NET_WM_STATE_MAXIMIZED_VERT",
"_NET_WM_STATE_MAXIMIZED_HORZ",
"WM_STATE",
+ "CLIPBOARD",
+ "_WL_SELECTION",
+ "CLIPBOARD_MANAGER",
};
/* General helpers */
@@ -908,6 +911,12 @@ static int x11_event_handler(int fd, uint32_t mask, void *data) {
while ((event = xcb_poll_for_event(xwm->xcb_conn))) {
count++;
+
+ if (xwm_handle_selection_event(xwm, event)) {
+ free(event);
+ continue;
+ }
+
switch (event->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) {
case XCB_CREATE_NOTIFY:
xwm_handle_create_notify(xwm, (xcb_create_notify_event_t *)event);
@@ -1332,6 +1341,8 @@ struct wlr_xwm *xwm_create(struct wlr_xwayland *wlr_xwayland) {
xwm_set_net_active_window(xwm, XCB_WINDOW_NONE);
+ xwm_selection_init(xwm);
+
xwm->compositor_surface_create.notify = handle_compositor_surface_create;
wl_signal_add(&wlr_xwayland->compositor->events.create_surface,
&xwm->compositor_surface_create);