[gtk/wip/chergert/for-main] macos: clear sorted surfaces when showing file chooser



commit 9e2357d5f3e028089dd106050a3a07d4fa510c20
Author: Christian Hergert <christian hergert me>
Date:   Fri Mar 11 18:19:44 2022 -0800

    macos: clear sorted surfaces when showing file chooser
    
    When showing the native file chooser, we need to ensure we clear the
    sorted surfaces in the display so that we don't risk delivering events
    correctly on the next frame.

 gtk/gtkfilechoosernativequartz.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtkfilechoosernativequartz.c b/gtk/gtkfilechoosernativequartz.c
index 3854937c0d..05ff830b9c 100644
--- a/gtk/gtkfilechoosernativequartz.c
+++ b/gtk/gtkfilechoosernativequartz.c
@@ -39,6 +39,7 @@
 #include "gtkfilefilterprivate.h"
 
 #include "macos/gdkmacos.h"
+#include "macos/gdkmacosdisplay-private.h"
 #include "macos/gdkmacossurface-private.h"
 
 typedef struct {
@@ -368,6 +369,9 @@ filechooser_quartz_launch (FileChooserQuartzData *data)
         [data->key_window makeKeyAndOrderFront:nil];
       }
 
+    /* Need to clear our cached copy of ordered windows */
+    _gdk_macos_display_clear_sorting (GDK_MACOS_DISPLAY (gdk_display_get_default ()));
+
     if (!data->skip_response)
       {
         g_slist_free_full (self->custom_files, g_object_unref);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]