From: Christian Hergert Date: Wed, 2 Mar 2022 08:40:21 +0000 (-0800) Subject: macos: reduce chances for layout cycles X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~3^2~7^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=edc6790fbb32a78bc4f59632202aa94fcd17a088;p=gtk4.git macos: reduce chances for layout cycles We need to be more careful about when we request a layout because it can cause us to get into a layout cycle at maximum frame rate. --- diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c index 14cb3de015..385775fe58 100644 --- a/gdk/macos/gdkmacossurface.c +++ b/gdk/macos/gdkmacossurface.c @@ -158,9 +158,6 @@ _gdk_macos_surface_reposition_children (GdkMacosSurface *self) if (GDK_IS_MACOS_POPUP_SURFACE (child)) _gdk_macos_popup_surface_reposition (GDK_MACOS_POPUP_SURFACE (child)); } - - if (GDK_IS_POPUP (self) && self->did_initial_present) - gdk_surface_request_layout (GDK_SURFACE (self)); } static void @@ -851,7 +848,6 @@ _gdk_macos_surface_configure (GdkMacosSurface *self) g_clear_object (&self->front); _gdk_surface_update_size (surface); - gdk_surface_request_layout (surface); gdk_surface_invalidate_rect (surface, NULL); } @@ -1110,7 +1106,6 @@ _gdk_macos_surface_monitor_changed (GdkMacosSurface *self) gdk_surface_invalidate_rect (GDK_SURFACE (self), NULL); self->in_change_monitor = FALSE; - _gdk_macos_surface_request_frame (self); } GdkMonitor *