mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
xwayland: forward configure events to compositor when unmapped
This commit is contained in:
parent
daa293da93
commit
af668ceb7c
1 changed files with 10 additions and 22 deletions
|
@ -715,34 +715,22 @@ static void xwm_handle_configure_request(struct wlr_xwm *xwm,
|
||||||
xcb_configure_request_event_t *ev) {
|
xcb_configure_request_event_t *ev) {
|
||||||
wlr_log(L_DEBUG, "XCB_CONFIGURE_REQUEST (%u) [%ux%u+%d,%d]", ev->window,
|
wlr_log(L_DEBUG, "XCB_CONFIGURE_REQUEST (%u) [%ux%u+%d,%d]", ev->window,
|
||||||
ev->width, ev->height, ev->x, ev->y);
|
ev->width, ev->height, ev->x, ev->y);
|
||||||
struct wlr_xwayland_surface *xsurface = lookup_surface(xwm, ev->window);
|
struct wlr_xwayland_surface *surface = lookup_surface(xwm, ev->window);
|
||||||
if (xsurface == NULL) {
|
if (surface == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: handle ev->{parent,sibling}?
|
// TODO: handle ev->{parent,sibling}?
|
||||||
|
|
||||||
if (xsurface->surface == NULL) {
|
struct wlr_xwayland_surface_configure_event wlr_event = {
|
||||||
// Surface has not been mapped yet
|
.surface = surface,
|
||||||
wlr_xwayland_surface_configure(xsurface, ev->x, ev->y,
|
.x = ev->x,
|
||||||
ev->width, ev->height);
|
.y = ev->y,
|
||||||
} else {
|
.width = ev->width,
|
||||||
struct wlr_xwayland_surface_configure_event *wlr_event =
|
.height = ev->height,
|
||||||
calloc(1, sizeof(struct wlr_xwayland_surface_configure_event));
|
};
|
||||||
if (wlr_event == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
wlr_event->surface = xsurface;
|
wlr_signal_emit_safe(&surface->events.request_configure, &wlr_event);
|
||||||
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);
|
|
||||||
|
|
||||||
free(wlr_event);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xwm_handle_configure_notify(struct wlr_xwm *xwm,
|
static void xwm_handle_configure_notify(struct wlr_xwm *xwm,
|
||||||
|
|
Loading…
Reference in a new issue