[gtk/wip/chergert/for-4-6: 38/56] macos: clear window stack before requesting motion
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/for-4-6: 38/56] macos: clear window stack before requesting motion
- Date: Wed, 16 Mar 2022 19:25:45 +0000 (UTC)
commit 9dbd79f2d8fc701c02211550b1243775dfe5a97e
Author: Christian Hergert <christian hergert me>
Date: Wed Mar 2 01:04:53 2022 -0800
macos: clear window stack before requesting motion
We want to ensure that we recalculate the sort order of windows before
processing the motion. Generally this would be done in response from the
display server in GdkMacosWindow, but I've seen it possible to race there.
gdk/macos/gdkmacossurface.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index 4357fbf1a9..6c116ed817 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -1244,11 +1244,15 @@ _gdk_macos_surface_get_buffer (GdkMacosSurface *self)
static void
_gdk_macos_surface_do_delayed_show (GdkMacosSurface *self)
{
+ GdkSurface *surface = (GdkSurface *)self;
+
g_assert (GDK_IS_MACOS_SURFACE (self));
self->show_on_next_swap = FALSE;
[self->window showAndMakeKey:YES];
- gdk_surface_request_motion (GDK_SURFACE (self));
+
+ _gdk_macos_display_clear_sorting (GDK_MACOS_DISPLAY (surface->display));
+ gdk_surface_request_motion (surface);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]