summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-02-18 23:03:56 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2014-02-18 23:21:06 -0500
commit7615d17293666df495aec34981a2cd55ea023c2d (patch)
treeca24c2a5c565283bd48de2c5f3f391e925abda1f
parent374e30043b894dddcc89e0905a36ff69c5be1642 (diff)
downloadmutter-7615d17293666df495aec34981a2cd55ea023c2d.tar.gz
wayland: Tie activate / deactivate to appears-focused
... rather than actual focus. This makes things behave better.
-rw-r--r--src/core/window.c8
-rw-r--r--src/wayland/meta-wayland-keyboard.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 5c57d3c7b..5465e7bf6 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6360,6 +6360,14 @@ meta_window_appears_focused_changed (MetaWindow *window)
if (window->frame)
meta_frame_queue_draw (window->frame);
+
+ if (window->surface)
+ {
+ if (meta_window_appears_focused (window))
+ meta_wayland_surface_activated (window->surface);
+ else
+ meta_wayland_surface_deactivated (window->surface);
+ }
}
/**
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 963ad2909..f4ac4d8f6 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -542,8 +542,6 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
struct wl_display *display = wl_client_get_display (client);
serial = wl_display_next_serial (display);
wl_keyboard_send_leave (resource, serial, keyboard->focus_surface->resource);
-
- meta_wayland_surface_deactivated (keyboard->focus_surface);
}
wl_list_remove (&keyboard->focus_resource_listener.link);
@@ -584,8 +582,6 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
&keyboard->keys);
}
- meta_wayland_surface_activated (surface);
-
keyboard->focus_resource = resource;
keyboard->focus_surface = surface;