diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 000de03..498ef93 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -23,6 +23,8 @@ * geometry for mapped XDG toplevels. * Phase 43: focus_set delivers keyboard focus via wlr_seat; headless keyboard * device created and attached to seat; mapped toplevels auto-focused. + * Phase 44: client_synth_configure, window_resize send XDG configure events + * so clients receive size changes from the WM. */ #ifdef HAVE_CONFIG_H @@ -759,8 +761,21 @@ static void wl_window_map(WNativeWindow win) { (void)win; } static void wl_window_map_raised(WNativeWindow win) { (void)win; } static void wl_window_map_subwindows(WNativeWindow parent) { (void)parent; } static void wl_window_unmap(WNativeWindow win) { (void)win; } -static void wl_window_move(WNativeWindow win, int x, int y) { (void)win; (void)x; (void)y; } -static void wl_window_resize(WNativeWindow win, int w, int h) { (void)win; (void)w; (void)h; } +static void wl_window_move(WNativeWindow win, int x, int y) +{ + /* Phase 44: position is tracked on the WM side; no server-side move needed. */ + (void)win; (void)x; (void)y; +} + +static void wl_window_resize(WNativeWindow win, int w, int h) +{ + /* Phase 44: send a configure with the new size. */ + struct wl_toplevel_view *v = wl_find_view_by_id(win); + if (!v || !v->xdg_surface || w <= 0 || h <= 0) + return; + wlr_xdg_toplevel_set_size(v->xdg_surface, (uint32_t)w, (uint32_t)h); + wlr_xdg_surface_schedule_configure(v->xdg_surface); +} static void wl_window_set_border(WNativeWindow win, unsigned long pixel) { (void)win; (void)pixel; } static void wl_window_set_border_width(WNativeWindow win, int width) { (void)win; (void)width; } static void wl_window_set_save_under(WNativeWindow win, int save_under) { (void)win; (void)save_under; } @@ -831,7 +846,16 @@ static void wl_client_synth_configure(WNativeWindow client_win, int x, int y, int width, int height, int border_width, WNativeWindow above) -{ (void)client_win; (void)x; (void)y; (void)width; (void)height; (void)border_width; (void)above; } +{ + /* Phase 44: send an XDG configure with the new size to the client. */ + (void)x; (void)y; (void)border_width; (void)above; + struct wl_toplevel_view *v = wl_find_view_by_id(client_win); + if (!v || !v->xdg_surface) + return; + if (width > 0 && height > 0) + wlr_xdg_toplevel_set_size(v->xdg_surface, (uint32_t)width, (uint32_t)height); + wlr_xdg_surface_schedule_configure(v->xdg_surface); +} static void wl_client_add_to_save_set(WNativeWindow win) { (void)win; } static void wl_client_remove_from_save_set(WNativeWindow win) { (void)win; }