diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-10-06 15:06:47 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-10-08 12:55:04 +0800 |
commit | 9990f1ac294300ca1e5839cb4e168e285eb9d122 (patch) | |
tree | 4d7e646c6b17a9ee0e5c99fa3f98f7e34fdcdec2 | |
parent | 08ecf779f9506e74f863edc9552977f2a5e4f71c (diff) | |
download | gtk+-9990f1ac294300ca1e5839cb4e168e285eb9d122.tar.gz |
GDK/Win32: Fix modal window handling
Make sure that we get the state of the modal window properly, and send out the
corresponding notification signals.
This will ensure that we do not try to activate windows that should have become
inactivated due to it opening modal windows and render the program unresponsive
because we are not activating the correct window that is due to receive user
input.
-rw-r--r-- | gdk/win32/gdksurface-win32.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c index 3e9de289bd..2ef43845b8 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -4825,7 +4825,12 @@ gdk_win32_toplevel_set_property (GObject *object, break; case LAST_PROP + GDK_TOPLEVEL_PROP_MODAL: - _gdk_push_modal_window (surface); + GDK_SURFACE (surface)->modal_hint = g_value_get_boolean (value); + + if (GDK_SURFACE (surface)->modal_hint) + _gdk_push_modal_window (surface); + + g_object_notify_by_pspec (G_OBJECT (surface), pspec); break; case LAST_PROP + GDK_TOPLEVEL_PROP_ICON_LIST: @@ -4879,6 +4884,7 @@ gdk_win32_toplevel_get_property (GObject *object, break; case LAST_PROP + GDK_TOPLEVEL_PROP_MODAL: + g_value_set_boolean (value, GDK_SURFACE (surface)->modal_hint); break; case LAST_PROP + GDK_TOPLEVEL_PROP_ICON_LIST: |