[gtk/fix-3728-3799] gdkevents-win32.c: Disable configuration at minizing surfaces
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-3728-3799] gdkevents-win32.c: Disable configuration at minizing surfaces
- Date: Thu, 1 Jul 2021 10:58:35 +0000 (UTC)
commit 8f8631870d5796d2e643ca9772dbfad1ad1bb22c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Jul 1 18:55:26 2021 +0800
gdkevents-win32.c: Disable configuration at minizing surfaces
We want to temprarily stop the surface from being configured when it is
minimized, so that when it is restored the surface will be in a
consistent state. Note that we are not explicitly enabling the
forced configuration when restoring the underlying Win32 HWND as the
the toplevel presentation will restore those for us when we make the
surface visible again.
gdk/win32/gdkevents-win32.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 808354c4ae..6fb191b44b 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2807,6 +2807,7 @@ gdk_event_translate (MSG *msg,
GdkToplevelState set_bits, unset_bits, old_state, new_state;
old_state = window->state;
+ impl = GDK_WIN32_SURFACE (window);
set_bits = 0;
unset_bits = 0;
@@ -2825,10 +2826,16 @@ gdk_event_translate (MSG *msg,
* If we are minizing, pause all surface layout computations, and re-start the
* computation once we are coming out of a minimized state
*/
- if (!(old_state & GDK_TOPLEVEL_STATE_MINIMIZED) && set_bits & GDK_TOPLEVEL_STATE_MINIMIZED)
- gdk_surface_freeze_updates (window);
+ if (!(old_state & GDK_TOPLEVEL_STATE_MINIMIZED) &&
+ set_bits & GDK_TOPLEVEL_STATE_MINIMIZED)
+ {
+ impl->drag_move_resize_context.native_move_resize_pending = FALSE;
+ impl->toplevel_force_resize = FALSE;
+ gdk_surface_freeze_updates (window);
+ }
- if (old_state & GDK_TOPLEVEL_STATE_MINIMIZED && unset_bits & GDK_TOPLEVEL_STATE_MINIMIZED)
+ if (old_state & GDK_TOPLEVEL_STATE_MINIMIZED &&
+ unset_bits & GDK_TOPLEVEL_STATE_MINIMIZED)
gdk_surface_thaw_updates (window);
gdk_surface_set_is_mapped (window, !!IsWindowVisible (msg->hwnd));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]