From 721f1f070bf9151df8aeb7ca86b6f2e664b01738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 Aug 2013 22:14:58 -0700 Subject: [PATCH] xwm: Set _NET_WM_CM_S0 instead of relying on the xwayland module to do it Not sure why I made xwayland claim this selection, seem a little awkward in retrospect. --- src/xwayland/window-manager.c | 6 ++++++ src/xwayland/xwayland.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 257c1088e..d63b042cf 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -1534,6 +1534,7 @@ weston_wm_get_resources(struct weston_wm *wm) { "WM_STATE", F(atom.wm_state) }, { "WM_S0", F(atom.wm_s0) }, { "WM_CLIENT_MACHINE", F(atom.wm_client_machine) }, + { "_NET_WM_CM_S0", F(atom.net_wm_cm_s0) }, { "_NET_WM_NAME", F(atom.net_wm_name) }, { "_NET_WM_PID", F(atom.net_wm_pid) }, { "_NET_WM_ICON", F(atom.net_wm_icon) }, @@ -1689,6 +1690,11 @@ weston_wm_create_wm_window(struct weston_wm *wm) wm->wm_window, wm->atom.wm_s0, XCB_TIME_CURRENT_TIME); + + xcb_set_selection_owner(wm->conn, + wm->wm_window, + wm->atom.net_wm_cm_s0, + XCB_TIME_CURRENT_TIME); } struct weston_wm * diff --git a/src/xwayland/xwayland.h b/src/xwayland/xwayland.h index c68a517e7..21b499edb 100644 --- a/src/xwayland/xwayland.h +++ b/src/xwayland/xwayland.h @@ -85,6 +85,7 @@ struct weston_wm { xcb_atom_t wm_state; xcb_atom_t wm_s0; xcb_atom_t wm_client_machine; + xcb_atom_t net_wm_cm_s0; xcb_atom_t net_wm_name; xcb_atom_t net_wm_pid; xcb_atom_t net_wm_icon;