aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-27 10:49:31 +0200
committerGitHub <noreply@github.com>2018-04-27 10:49:31 +0200
commit04af09862aea28c1b9ba495f3706f333107e0818 (patch)
tree6045d844949fe2649bf1c2663907c7948660e02e /xwayland
parent3feb690aea3cec6b52ef10b20676f7a3c3eacdc7 (diff)
parentaf668ceb7c90b92249dd9b3611f3d0ce3ee28701 (diff)
Merge pull request #918 from emersion/xwayland-unmapped-request-configure
xwayland: forward configure events to compositor when unmapped
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/xwm.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 6fac6ca4..e77d6e96 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -717,34 +717,22 @@ static void xwm_handle_configure_request(struct wlr_xwm *xwm,
xcb_configure_request_event_t *ev) {
wlr_log(L_DEBUG, "XCB_CONFIGURE_REQUEST (%u) [%ux%u+%d,%d]", ev->window,
ev->width, ev->height, ev->x, ev->y);
- struct wlr_xwayland_surface *xsurface = lookup_surface(xwm, ev->window);
- if (xsurface == NULL) {
+ struct wlr_xwayland_surface *surface = lookup_surface(xwm, ev->window);
+ if (surface == NULL) {
return;
}
// TODO: handle ev->{parent,sibling}?
- if (xsurface->surface == NULL) {
- // Surface has not been mapped yet
- wlr_xwayland_surface_configure(xsurface, ev->x, ev->y,
- ev->width, ev->height);
- } else {
- struct wlr_xwayland_surface_configure_event *wlr_event =
- calloc(1, sizeof(struct wlr_xwayland_surface_configure_event));
- if (wlr_event == NULL) {
- return;
- }
-
- wlr_event->surface = xsurface;
- wlr_event->x = ev->x;
- wlr_event->y = ev->y;
- wlr_event->width = ev->width;
- wlr_event->height = ev->height;
-
- wlr_signal_emit_safe(&xsurface->events.request_configure, wlr_event);
+ struct wlr_xwayland_surface_configure_event wlr_event = {
+ .surface = surface,
+ .x = ev->x,
+ .y = ev->y,
+ .width = ev->width,
+ .height = ev->height,
+ };
- free(wlr_event);
- }
+ wlr_signal_emit_safe(&surface->events.request_configure, &wlr_event);
}
static void xwm_handle_configure_notify(struct wlr_xwm *xwm,