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.
This commit is contained in:
Christian Hergert 2022-03-02 00:40:21 -08:00 committed by Christian Hergert
parent b0d7889b20
commit edc6790fbb

View File

@ -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 *