From 0684ef95c5b8f1a1970c681b3e18417519a37d0e Mon Sep 17 00:00:00 2001 From: Tomas Frydrych Date: Tue, 21 Oct 2008 08:58:44 +0100 Subject: [PATCH] Fixed up stage reactivity bug. --- src/compositor/mutter/compositor-mutter.c | 20 ++++++++++---------- src/compositor/mutter/plugins/scratch.c | 5 +++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/compositor/mutter/compositor-mutter.c b/src/compositor/mutter/compositor-mutter.c index 848d5ad6b..136f4bf16 100644 --- a/src/compositor/mutter/compositor-mutter.c +++ b/src/compositor/mutter/compositor-mutter.c @@ -1643,20 +1643,18 @@ process_property_notify (Mutter *compositor, } static void -show_overlay_window (MetaScreen *screen, Window cow) +show_overlay_window (Display *xdisplay, Window xstage, Window xoverlay) { -#if 0 - MetaDisplay *display = meta_screen_get_display (screen); - Display *xdisplay = meta_display_get_xdisplay (display); XserverRegion region; region = XFixesCreateRegion (xdisplay, NULL, 0); - XFixesSetWindowShapeRegion (xdisplay, cow, ShapeBounding, 0, 0, 0); - XFixesSetWindowShapeRegion (xdisplay, cow, ShapeInput, 0, 0, region); + XFixesSetWindowShapeRegion (xdisplay, xoverlay, ShapeBounding, 0, 0, 0); + + XFixesSetWindowShapeRegion (xdisplay, xoverlay, ShapeInput, 0, 0, region); + XFixesSetWindowShapeRegion (xdisplay, xstage, ShapeInput, 0, 0, region); XFixesDestroyRegion (xdisplay, region); -#endif } static Window @@ -1783,15 +1781,17 @@ clutter_cmp_manage_screen (MetaCompositor *compositor, NULL); + /* + * Must do this *before* creating the plugin manager, in case any of the + * plugins need to adjust the screen shape regions. + */ + show_overlay_window (xdisplay, xwin, info->output); info->plugin_mgr = mutter_plugin_manager_new (screen); clutter_actor_show_all (info->stage); clutter_actor_show_all (info->overlay_group); - - /* Now we're up and running we can show the output if needed */ - show_overlay_window (screen, info->output); #endif } diff --git a/src/compositor/mutter/plugins/scratch.c b/src/compositor/mutter/plugins/scratch.c index 6d468a2d6..127703e4d 100644 --- a/src/compositor/mutter/plugins/scratch.c +++ b/src/compositor/mutter/plugins/scratch.c @@ -860,6 +860,11 @@ do_init (const char *params) clutter_actor_set_position (panel, 0, -clutter_actor_get_height (panel)); + /* + * Set up the stage even processing + */ + disable_stage (plugin); + /* * Hook to the captured signal, so we get to see all events before our * children and do not interfere with their event processing.