mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 22:55:58 +01:00
xwm: handle configure notify
This commit is contained in:
parent
a9d70a6256
commit
fa94a06fd6
1 changed files with 18 additions and 0 deletions
|
@ -535,6 +535,21 @@ static void handle_configure_request(struct wlr_xwm *xwm,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void handle_configure_notify(struct wlr_xwm *xwm,
|
||||||
|
xcb_configure_notify_event_t *ev) {
|
||||||
|
struct wlr_xwayland_surface *xsurface =
|
||||||
|
lookup_surface_any(xwm, ev->window);
|
||||||
|
|
||||||
|
if (!xsurface) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
xsurface->x = ev->x;
|
||||||
|
xsurface->y = ev->y;
|
||||||
|
xsurface->width = ev->width;
|
||||||
|
xsurface->height = ev->height;
|
||||||
|
}
|
||||||
|
|
||||||
static void handle_map_request(struct wlr_xwm *xwm,
|
static void handle_map_request(struct wlr_xwm *xwm,
|
||||||
xcb_map_request_event_t *ev) {
|
xcb_map_request_event_t *ev) {
|
||||||
wlr_log(L_DEBUG, "XCB_MAP_REQUEST (%u)", ev->window);
|
wlr_log(L_DEBUG, "XCB_MAP_REQUEST (%u)", ev->window);
|
||||||
|
@ -630,6 +645,9 @@ static int x11_event_handler(int fd, uint32_t mask, void *data) {
|
||||||
case XCB_CONFIGURE_REQUEST:
|
case XCB_CONFIGURE_REQUEST:
|
||||||
handle_configure_request(xwm, (xcb_configure_request_event_t *)event);
|
handle_configure_request(xwm, (xcb_configure_request_event_t *)event);
|
||||||
break;
|
break;
|
||||||
|
case XCB_CONFIGURE_NOTIFY:
|
||||||
|
handle_configure_notify(xwm, (xcb_configure_notify_event_t *)event);
|
||||||
|
break;
|
||||||
case XCB_MAP_REQUEST:
|
case XCB_MAP_REQUEST:
|
||||||
handle_map_request(xwm, (xcb_map_request_event_t *)event);
|
handle_map_request(xwm, (xcb_map_request_event_t *)event);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue