From cc4a65fe948658a5187394d1e1386fde3bec829e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 25 Jul 2016 15:28:06 +0800 Subject: [PATCH] x11/nested: Only paint monitor stage views when enabled Only paint the per monitor stage views when enabled, otherwise bad things happen. https://bugzilla.gnome.org/show_bug.cgi?id=768976 --- src/backends/x11/meta-backend-x11.c | 3 ++- src/backends/x11/meta-stage-x11-nested.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c index 24aaca323..c9a6b9af0 100644 --- a/src/backends/x11/meta-backend-x11.c +++ b/src/backends/x11/meta-backend-x11.c @@ -817,7 +817,8 @@ meta_backend_x11_update_screen_size (MetaBackend *backend, ClutterActor *stage = meta_backend_get_stage (backend); MetaRenderer *renderer = meta_backend_get_renderer (backend); - meta_renderer_rebuild_views (renderer); + if (meta_is_stage_views_enabled ()) + meta_renderer_rebuild_views (renderer); clutter_actor_set_size (stage, width, height); } else diff --git a/src/backends/x11/meta-stage-x11-nested.c b/src/backends/x11/meta-stage-x11-nested.c index c9dee09d9..9777191e3 100644 --- a/src/backends/x11/meta-stage-x11-nested.c +++ b/src/backends/x11/meta-stage-x11-nested.c @@ -66,7 +66,10 @@ meta_stage_x11_nested_get_views (ClutterStageWindow *stage_window) MetaBackend *backend = meta_get_backend (); MetaRenderer *renderer = meta_backend_get_renderer (backend); - return meta_renderer_get_views (renderer); + if (meta_is_stage_views_enabled ()) + return meta_renderer_get_views (renderer); + else + return clutter_stage_window_parent_iface->get_views (stage_window); } static void @@ -80,6 +83,12 @@ meta_stage_x11_nested_finish_frame (ClutterStageWindow *stage_window) CoglFramebuffer *onscreen = COGL_FRAMEBUFFER (stage_x11->onscreen); GList *l; + /* + * If we are in legacy mode, the stage is already on the onscreen. + */ + if (!meta_is_stage_views_enabled ()) + return; + if (!stage_nested->pipeline) stage_nested->pipeline = cogl_pipeline_new (clutter_backend->cogl_context);