[mutter] stage/x11: Only resize X11 CM stage in response to ConfigureNotify



commit c6fc3a8953dcc81a2c532561ba8e1a9abb6b1160
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Aug 12 19:23:49 2020 +0200

    stage/x11: Only resize X11 CM stage in response to ConfigureNotify
    
    Flip flop resize, which is the result of respecting ConfigureNotify
    makes test annoyingly racy, as one cannot do
    
        clutter_actor_set_size (stage, 1024, 768);
        wait_for_paint (stage);
        g_assert_assert (clutter_actor_get_width (stage) == 1024);
    
    The reason for this is any lingering ConfigureNotify event that might
    arrive in an inconvenient time in response to some earlier resize.
    
    In order to not risk breaking any current behavior in the X11 CM case
    (running as a compositing window manager), only avoid changing the stage
    size in response to ConfigureNotify when running nested.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404

 src/backends/x11/meta-stage-x11.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/x11/meta-stage-x11.c b/src/backends/x11/meta-stage-x11.c
index 674cd3e477..8ebfcacf1b 100644
--- a/src/backends/x11/meta-stage-x11.c
+++ b/src/backends/x11/meta-stage-x11.c
@@ -602,7 +602,13 @@ meta_stage_x11_translate_event (MetaStageX11 *stage_x11,
 
           stage_width = xevent->xconfigure.width;
           stage_height = xevent->xconfigure.height;
-          clutter_actor_set_size (CLUTTER_ACTOR (stage), stage_width, stage_height);
+
+          if (META_IS_BACKEND_X11_CM (stage_x11->backend))
+            {
+              clutter_actor_set_size (CLUTTER_ACTOR (stage),
+                                      stage_width,
+                                      stage_height);
+            }
 
           if (size_changed)
             {


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