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>
dev
Philipp Kerling 7 years ago committed by Quentin Glidic
parent 4c4b9cfb1a
commit ba8a0d041e
No known key found for this signature in database
GPG Key ID: AC203F96E2C34BB7
  1. 2
      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);

Loading…
Cancel
Save