summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorPhilipp Kerling <pkerling@casix.org>2017-07-26 12:02:15 +0200
committerQuentin Glidic <sardemff7+git@sardemff7.net>2017-07-26 12:50:05 +0200
commitba8a0d041ed83ebe18b919d8b2c8a02849ca1c7e (patch)
tree04a5b008794e0392c9eaa45ec743238bdea8c8dd /desktop-shell
parent4c4b9cfb1a55ee864beaf25286bfe4364036f0df (diff)
desktop-shell: Track focused shell surface by main surface
The focused surface is used for determining whether shell surfaces are activated. They should also be considered activated when a subsurface has focus. Inserting a call to weston_surface_get_main_surface fixes this. seat->focused_surface is only used for shell_surface keyboard focus tracking. Signed-off-by: Philipp Kerling <pkerling@casix.org> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 832a7b74..4608cf2f 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1852,7 +1852,7 @@ handle_keyboard_focus(struct wl_listener *listener, void *data)
shell_surface_lose_keyboard_focus(shsurf);
}
- seat->focused_surface = keyboard->focus;
+ seat->focused_surface = weston_surface_get_main_surface(keyboard->focus);
if (seat->focused_surface) {
struct shell_surface *shsurf = get_shell_surface(seat->focused_surface);