[gtk/fix-3728-3799: 69/69] gdksurface-win32.c: Ensure timely surface size update
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-3728-3799: 69/69] gdksurface-win32.c: Ensure timely surface size update
- Date: Tue, 20 Jul 2021 06:51:36 +0000 (UTC)
commit ea80eff1250b6c4d2c87736675027e607cdd5470
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Jul 20 13:46:21 2021 +0800
gdksurface-win32.c: Ensure timely surface size update
During the situation where we force a resize on the surface when we are not
resizing it using the resize edges nor maximize/fullscreen nor AeroSnap
operations, make sure we update the surface width/height accordingly and
call _gdk_surface_update_size().
gdk/win32/gdksurface-win32.c | 12 +++++++++++-
gdk/win32/gdksurface-win32.h | 1 +
2 files changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 6e9d57844f..48e71b102e 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -4606,7 +4606,10 @@ _gdk_win32_surface_request_layout (GdkSurface *surface)
impl->inhibit_configure = TRUE;
if (!impl->inhibit_configure)
- impl->drag_move_resize_context.native_move_resize_pending = TRUE;
+ {
+ impl->drag_move_resize_context.native_move_resize_pending = TRUE;
+ impl->force_update_size = TRUE;
+ }
}
else if (GDK_IS_POPUP (surface))
{
@@ -4632,6 +4635,13 @@ _gdk_win32_surface_compute_size (GdkSurface *surface)
surface->height = impl->next_layout.configured_height;
_gdk_surface_update_size (surface);
}
+ else if (impl->force_update_size)
+ {
+ surface->width = width;
+ surface->height = height;
+ _gdk_surface_update_size (surface);
+ impl->force_update_size = FALSE;
+ }
return FALSE;
}
diff --git a/gdk/win32/gdksurface-win32.h b/gdk/win32/gdksurface-win32.h
index 5f85c50373..d878ff0ffc 100644
--- a/gdk/win32/gdksurface-win32.h
+++ b/gdk/win32/gdksurface-win32.h
@@ -342,6 +342,7 @@ struct _GdkWin32Surface
int configured_height;
RECT configured_rect;
} next_layout;
+ gboolean force_update_size;
#ifdef GDK_WIN32_ENABLE_EGL
EGLSurface egl_surface;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]