aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-05-26 08:19:52 +0100
committerGitHub <noreply@github.com>2018-05-26 08:19:52 +0100
commit0eec0c73033bc3538f693f79e0fc146250112cec (patch)
tree9c30fea5bcf735e55871000c83d62f10c7d408d9
parent6eb4b5b54d8640115764401822787c6e9c88697c (diff)
parent5dd1a838f3ca5bcc158b0936d9fa1ecd17c5b500 (diff)
Merge pull request #1001 from ammen99/xterm-fix
xwm: set the proper event mask in client messages
-rw-r--r--xwayland/xwm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 7c9cd304..b397b1e8 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -187,7 +187,7 @@ static void xwm_set_net_active_window(struct wlr_xwm *xwm,
}
static void xwm_send_wm_message(struct wlr_xwayland_surface *surface,
- xcb_client_message_data_t *data) {
+ xcb_client_message_data_t *data, uint32_t event_mask) {
struct wlr_xwm *xwm = surface->xwm;
xcb_client_message_event_t event = {
@@ -202,7 +202,7 @@ static void xwm_send_wm_message(struct wlr_xwayland_surface *surface,
xcb_send_event(xwm->xcb_conn,
0, // propagate
surface->window_id,
- XCB_EVENT_MASK_NO_EVENT,
+ event_mask,
(const char *)&event);
xcb_flush(xwm->xcb_conn);
}
@@ -221,7 +221,8 @@ static void xwm_send_focus_window(struct wlr_xwm *xwm,
xcb_client_message_data_t message_data = { 0 };
message_data.data32[0] = xwm->atoms[WM_TAKE_FOCUS];
message_data.data32[1] = XCB_TIME_CURRENT_TIME;
- xwm_send_wm_message(xsurface, &message_data);
+ xwm_send_wm_message(xsurface, &message_data,
+ XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT);
xcb_set_input_focus(xwm->xcb_conn, XCB_INPUT_FOCUS_POINTER_ROOT,
xsurface->window_id, XCB_CURRENT_TIME);
@@ -1266,7 +1267,7 @@ void wlr_xwayland_surface_close(struct wlr_xwayland_surface *xsurface) {
xcb_client_message_data_t message_data = {0};
message_data.data32[0] = xwm->atoms[WM_DELETE_WINDOW];
message_data.data32[1] = XCB_CURRENT_TIME;
- xwm_send_wm_message(xsurface, &message_data);
+ xwm_send_wm_message(xsurface, &message_data, XCB_EVENT_MASK_NO_EVENT);
} else {
xcb_kill_client(xwm->xcb_conn, xsurface->window_id);
xcb_flush(xwm->xcb_conn);
@@ -1665,7 +1666,7 @@ void wlr_xwayland_surface_ping(struct wlr_xwayland_surface *surface) {
data.data32[1] = XCB_CURRENT_TIME;
data.data32[2] = surface->window_id;
- xwm_send_wm_message(surface, &data);
+ xwm_send_wm_message(surface, &data, XCB_EVENT_MASK_NO_EVENT);
wl_event_source_timer_update(surface->ping_timer,
surface->xwm->ping_timeout);