aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-24 13:24:26 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-24 13:24:26 -0400
commita9d70a625697dcbe6017aca104a6b649c7ae0ac0 (patch)
tree84b746c2834834d0b511bed8b166ec827e014d26
parenta3f27546681a6a92e1e37ed7692428c36b486a8e (diff)
xwm: set window attributes on create
-rw-r--r--xwayland/xwm.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 2d88c2cb..b8168431 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -67,6 +67,14 @@ static struct wlr_xwayland_surface *wlr_xwayland_surface_create(
wlr_log(L_ERROR, "Could not allocate wlr xwayland surface");
return NULL;
}
+
+ uint32_t values[1];
+ values[0] =
+ XCB_EVENT_MASK_FOCUS_CHANGE |
+ XCB_EVENT_MASK_PROPERTY_CHANGE;
+ xcb_change_window_attributes(xwm->xcb_conn, window_id,
+ XCB_CW_EVENT_MASK, &values);
+
surface->xwm = xwm;
surface->window_id = window_id;
surface->x = x;
@@ -530,11 +538,7 @@ static void handle_configure_request(struct wlr_xwm *xwm,
static void handle_map_request(struct wlr_xwm *xwm,
xcb_map_request_event_t *ev) {
wlr_log(L_DEBUG, "XCB_MAP_REQUEST (%u)", ev->window);
- const uint32_t value_list = XCB_EVENT_MASK_FOCUS_CHANGE |
- XCB_EVENT_MASK_PROPERTY_CHANGE;
- XCB_CALL(xwm, xcb_change_window_attributes_checked(xwm->xcb_conn,
- ev->window, XCB_CW_EVENT_MASK, &value_list));
- XCB_CALL(xwm, xcb_map_window_checked(xwm->xcb_conn, ev->window));
+ xcb_map_window(xwm->xcb_conn, ev->window);
}
static void handle_map_notify(struct wlr_xwm *xwm, xcb_map_notify_event_t *ev) {