[gtk/wip/baedert/resize2: 36/37] frameclockidle: Remove layout loop



commit c4c84f573e904d8ed0213a79b5e9b32170b88dcb
Author: Timm Bäder <mail baedert org>
Date:   Mon May 25 19:45:24 2020 +0200

    frameclockidle: Remove layout loop

 gdk/gdkframeclockidle.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c
index 2312e30b25..ac92e3d5f5 100644
--- a/gdk/gdkframeclockidle.c
+++ b/gdk/gdkframeclockidle.c
@@ -406,7 +406,6 @@ gdk_frame_clock_paint_idle (void *data)
         case GDK_FRAME_CLOCK_PHASE_LAYOUT:
           if (priv->freeze_count == 0)
             {
-             int iter;
 #ifdef G_ENABLE_DEBUG
               if (GDK_DEBUG_CHECK (FRAMES))
                 {
@@ -417,20 +416,8 @@ gdk_frame_clock_paint_idle (void *data)
 #endif
 
               priv->phase = GDK_FRAME_CLOCK_PHASE_LAYOUT;
-             /* We loop in the layout phase, because we don't want to progress
-              * into the paint phase with invalid size allocations. This may
-              * happen in some situation like races between user window
-              * resizes and natural size changes.
-              */
-             iter = 0;
-              while ((priv->requested & GDK_FRAME_CLOCK_PHASE_LAYOUT) &&
-                    priv->freeze_count == 0 && iter++ < 4)
-                {
-                  priv->requested &= ~GDK_FRAME_CLOCK_PHASE_LAYOUT;
-                  _gdk_frame_clock_emit_layout (clock);
-                }
-             if (iter == 5)
-               g_warning ("gdk-frame-clock: layout continuously requested, giving up after 4 tries");
+              priv->requested &= ~GDK_FRAME_CLOCK_PHASE_LAYOUT;
+              _gdk_frame_clock_emit_layout (clock);
             }
           G_GNUC_FALLTHROUGH;
 


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