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
This commit is contained in:
Jonas Ådahl 2020-08-12 19:23:49 +02:00
parent 07e964e9fc
commit c6fc3a8953

View File

@ -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)
{