summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2013-11-25 17:44:07 +0100
committerRui Matos <tiagomatos@gmail.com>2013-12-03 13:58:27 +0100
commit20e92c5a72aac65b0ca9a36a310169088babe9aa (patch)
tree011c30ef98ecf892e8a42856c583382a903bba5e
parent0850da44d734496c873385fb0169f9e891d7edeb (diff)
downloadmutter-20e92c5a72aac65b0ca9a36a310169088babe9aa.tar.gz
wayland: Set the clutter stage focus when we focus a window
Otherwise clutter events don't have their source actor properly set and we aren't able to determine the MetaWindow to which a given keybinding applies. https://bugzilla.gnome.org/show_bug.cgi?id=719724
-rw-r--r--src/wayland/meta-wayland.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 061aa0e60..3d1961a81 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -210,10 +210,13 @@ meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
MetaWindow *window)
{
MetaWaylandSurface *surface = window ? window->surface : NULL;
+ ClutterActor *window_actor = window ? CLUTTER_ACTOR (meta_window_get_compositor_private (window)) : NULL;
meta_wayland_keyboard_set_focus (&compositor->seat->keyboard,
surface);
meta_wayland_data_device_set_keyboard_focus (compositor->seat);
+
+ clutter_stage_set_key_focus (CLUTTER_STAGE (compositor->stage), window_actor);
}
void