diff options
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r-- | xwayland/xwm.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 37f4298d..83b096aa 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -199,13 +199,10 @@ static void handle_configure_request(struct wlr_xwm *xwm, surface->y = ev->y; surface->width = ev->width; surface->height = ev->height; - // handle parent/sibling? + // TODO: handle parent/sibling? - uint32_t values[] = {ev->x, ev->y, ev->width, ev->height, 0}; - uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | - XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | - XCB_CONFIG_WINDOW_BORDER_WIDTH; - xcb_configure_window(xwm->xcb_conn, ev->window, mask, values); + wlr_xwayland_surface_configure(xwm, surface, ev->x, ev->y, ev->width, + ev->height); } static void handle_map_request(struct wlr_xwm *xwm, @@ -430,6 +427,16 @@ void wlr_xwayland_surface_activate(struct wlr_xwayland *wlr_xwayland, xcb_flush(xwm->xcb_conn); } +void wlr_xwayland_surface_configure(struct wlr_xwm *xwm, + struct wlr_xwayland_surface *surface, uint32_t x, uint32_t y, + uint32_t width, uint32_t height) { + uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | + XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | + XCB_CONFIG_WINDOW_BORDER_WIDTH; + uint32_t values[] = {x, y, width, height, 0}; + xcb_configure_window(xwm->xcb_conn, surface->window_id, mask, values); +} + void xwm_destroy(struct wlr_xwm *xwm) { if (!xwm) { return; |