summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-02-19 21:45:59 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-06-10 21:20:46 +0000
commit2844fde1df83707f3e32ed4ead54b46a476e551d (patch)
tree8553669bd7c6214e512af802a045d5f974e9d221
parentb4a52c732dbf3863bd22535077a2506538f9a8ce (diff)
input: Remove keyboard listener keyboard focus activation
This is part of the bigger series to remove the need to have a keyboard present to activate views/surfaces. This clean-ups any keyboard listener we had installed previously. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iacd63a857cfe4d17c665f37dc8338cd790b7d16f
-rw-r--r--src/input.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/input.c b/src/input.c
index 64d23ef..6f8b7cb 100644
--- a/src/input.c
+++ b/src/input.c
@@ -85,30 +85,6 @@ get_ivi_shell_seat(struct weston_seat *seat)
struct ivi_shell_seat, seat_destroy_listener);
}
-
-static void
-ivi_shell_seat_handle_keyboard_focus(struct wl_listener *listener, void *data)
-{
- struct weston_keyboard *keyboard = data;
- struct ivi_shell_seat *shseat = get_ivi_shell_seat(keyboard->seat);
-
- if (shseat->focused_surface) {
- struct ivi_surface *surf =
- get_ivi_shell_surface(shseat->focused_surface);
- if (surf && --surf->focus_count == 0)
- weston_desktop_surface_set_activated(surf->dsurface, false);
- }
-
- shseat->focused_surface = weston_surface_get_main_surface(keyboard->focus);
-
- if (shseat->focused_surface) {
- struct ivi_surface *surf =
- get_ivi_shell_surface(shseat->focused_surface);
- if (surf && surf->focus_count++ == 0)
- weston_desktop_surface_set_activated(surf->dsurface, true);
- }
-}
-
static void
ivi_shell_seat_handle_pointer_focus(struct wl_listener *listener, void *data)
{
@@ -139,13 +115,11 @@ ivi_shell_seat_handle_pointer_focus(struct wl_listener *listener, void *data)
static void
ivi_shell_seat_handle_caps_changed(struct wl_listener *listener, void *data)
{
- struct weston_keyboard *keyboard;
struct weston_pointer *pointer;
struct ivi_shell_seat *shseat;
shseat = container_of(listener, struct ivi_shell_seat,
caps_changed_listener);
- keyboard = weston_seat_get_keyboard(shseat->seat);
pointer = weston_seat_get_pointer(shseat->seat);
if (pointer && wl_list_empty(&shseat->pointer_focus_listener.link)) {
@@ -155,15 +129,6 @@ ivi_shell_seat_handle_caps_changed(struct wl_listener *listener, void *data)
wl_list_remove(&shseat->pointer_focus_listener.link);
wl_list_init(&shseat->pointer_focus_listener.link);
}
-
- if (keyboard &&
- wl_list_empty(&shseat->keyboard_focus_listener.link)) {
- wl_signal_add(&keyboard->focus_signal,
- &shseat->keyboard_focus_listener);
- } else if (!keyboard) {
- wl_list_remove(&shseat->keyboard_focus_listener.link);
- wl_list_init(&shseat->keyboard_focus_listener.link);
- }
}
static struct ivi_shell_seat *
@@ -184,8 +149,6 @@ ivi_shell_seat_create(struct weston_seat *seat, bool hide_cursor)
shseat->seat_destroy_listener.notify = ivi_shell_seat_handle_destroy;
wl_signal_add(&seat->destroy_signal, &shseat->seat_destroy_listener);
- shseat->keyboard_focus_listener.notify =
- ivi_shell_seat_handle_keyboard_focus;
wl_list_init(&shseat->keyboard_focus_listener.link);
shseat->pointer_focus_listener.notify =