[mutter/wayland] compositor: The stage is always focused when we're a Wayland compositor



commit 04b5232960553b93e70baf0335557b008073c459
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Feb 23 12:29:21 2014 -0500

    compositor: The stage is always focused when we're a Wayland compositor
    
    gnome-shell has some complex tracking to set the X input focus
    correctly, assuming various things about how the stage is set up in X11.
    For instance, it assumes that all actors that get key focus are
    gnome-shell Chrome actors that will get events through the stage, so
    when one of them is focused, it will try to set the focus back to the
    stage.
    
    In Wayland, windows are considered chrome actors that will get key
    events through the stage, so this only has the result of unfocusing any
    windows that have just received key focus.
    
    We should probably move this input focus moving to mutter instead of
    gnome-shell so we can better use mutter's internal state and heuristics.

 src/compositor/compositor.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index a93d6c6..a323c31 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -333,6 +333,9 @@ meta_stage_is_focused (MetaScreen *screen)
   ClutterStage *stage;
   Window window;
 
+  if (meta_is_wayland_compositor ())
+    return TRUE;
+
   stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
   if (!stage)
     return FALSE;


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