From 4822fa989e890958de6c988cc9dd597ef54b7331 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 7 Apr 2021 18:29:28 +0530 Subject: [PATCH] Wayland: wire up live resize notification --- glfw/wl_window.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index b0b49132b..9e8362846 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -428,6 +428,7 @@ static void xdgToplevelHandleConfigure(void* data, if (new_states & TOPLEVEL_STATE_RESIZING) { if (width) window->wl.user_requested_content_size.width = width; if (height) window->wl.user_requested_content_size.height = height; + if (!(window->wl.toplevel_states & TOPLEVEL_STATE_RESIZING)) _glfwInputLiveResize(window, true); } if (width != 0 && height != 0) { @@ -444,6 +445,7 @@ static void xdgToplevelHandleConfigure(void* data, } } } + bool live_resize_done = !(new_states & TOPLEVEL_STATE_RESIZING) && (window->wl.toplevel_states & TOPLEVEL_STATE_RESIZING); window->wl.toplevel_states = new_states; set_csd_window_geometry(window, &width, &height); debug("final window content size: %dx%d\n", window->wl.width, window->wl.height); @@ -451,6 +453,7 @@ static void xdgToplevelHandleConfigure(void* data, dispatchChangesAfterConfigure(window, width, height); _glfwInputWindowFocus(window, window->wl.toplevel_states & TOPLEVEL_STATE_ACTIVATED); ensure_csd_resources(window); + if (live_resize_done) _glfwInputLiveResize(window, false); } static void xdgToplevelHandleClose(void* data,