Skip to content

Commit

Permalink
macos: reduce chances for layout cycles
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chergert committed Mar 2, 2022
1 parent 82f1eaa commit ddf07ff
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions gdk/macos/gdkmacossurface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -877,7 +874,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);
}

Expand Down Expand Up @@ -1136,7 +1132,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 *
Expand Down

0 comments on commit ddf07ff

Please sign in to comment.