xwayland: expose wlr_xwayland_surface_configure
This commit is contained in:
parent
e3917af69d
commit
47d767dbc4
|
@ -56,5 +56,8 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
|
||||||
struct wlr_compositor *compositor);
|
struct wlr_compositor *compositor);
|
||||||
void wlr_xwayland_surface_activate(struct wlr_xwayland *wlr_xwayland,
|
void wlr_xwayland_surface_activate(struct wlr_xwayland *wlr_xwayland,
|
||||||
struct wlr_xwayland_surface *surface);
|
struct wlr_xwayland_surface *surface);
|
||||||
|
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);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -199,13 +199,10 @@ static void handle_configure_request(struct wlr_xwm *xwm,
|
||||||
surface->y = ev->y;
|
surface->y = ev->y;
|
||||||
surface->width = ev->width;
|
surface->width = ev->width;
|
||||||
surface->height = ev->height;
|
surface->height = ev->height;
|
||||||
// handle parent/sibling?
|
// TODO: handle parent/sibling?
|
||||||
|
|
||||||
uint32_t values[] = {ev->x, ev->y, ev->width, ev->height, 0};
|
wlr_xwayland_surface_configure(xwm, surface, ev->x, ev->y, ev->width,
|
||||||
uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y |
|
ev->height);
|
||||||
XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT |
|
|
||||||
XCB_CONFIG_WINDOW_BORDER_WIDTH;
|
|
||||||
xcb_configure_window(xwm->xcb_conn, ev->window, mask, values);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_map_request(struct wlr_xwm *xwm,
|
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);
|
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) {
|
void xwm_destroy(struct wlr_xwm *xwm) {
|
||||||
if (!xwm) {
|
if (!xwm) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue