diff options
author | emersion <contact@emersion.fr> | 2017-09-29 16:19:06 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-09-29 16:19:06 +0200 |
commit | 47d767dbc4fc88e399a7a2ef3edde9d906a7f773 (patch) | |
tree | 0ff8723810dd0e53ead5881aa1bcca56ab0b7e04 /xwayland/xwm.c | |
parent | e3917af69d1801a6deafa580f77b0feb10562992 (diff) |
xwayland: expose wlr_xwayland_surface_configure
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; |