diff options
Diffstat (limited to 'meta/recipes-graphics/wayland/weston/0003-desktop-shell-Rename-gain-lose-keyboard-focus-to-act.patch')
-rw-r--r-- | meta/recipes-graphics/wayland/weston/0003-desktop-shell-Rename-gain-lose-keyboard-focus-to-act.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-graphics/wayland/weston/0003-desktop-shell-Rename-gain-lose-keyboard-focus-to-act.patch b/meta/recipes-graphics/wayland/weston/0003-desktop-shell-Rename-gain-lose-keyboard-focus-to-act.patch new file mode 100644 index 0000000000..dcd0700fca --- /dev/null +++ b/meta/recipes-graphics/wayland/weston/0003-desktop-shell-Rename-gain-lose-keyboard-focus-to-act.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From edb31c456ae3da7ffffefb668a37ab88075c4b67 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marius Vlad <marius.vlad@collabora.com> | ||
3 | Date: Fri, 5 Mar 2021 21:40:22 +0200 | ||
4 | Subject: [PATCH 3/5] desktop-shell: Rename gain/lose keyboard focus to | ||
5 | activate/de-activate | ||
6 | |||
7 | This way it better reflects that it handles activation rather that input | ||
8 | focus. | ||
9 | |||
10 | Upstream-Status: Backport [ab39e1d76d4f6715cb300bc37f5c2a0e2d426208] | ||
11 | Signed-off-by: Marius Vlad <marius.vlad@collabora.com> | ||
12 | --- | ||
13 | desktop-shell/shell.c | 8 ++++---- | ||
14 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
15 | |||
16 | diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c | ||
17 | index 3791be25..c4669f11 100644 | ||
18 | --- a/desktop-shell/shell.c | ||
19 | +++ b/desktop-shell/shell.c | ||
20 | @@ -1869,14 +1869,14 @@ handle_pointer_focus(struct wl_listener *listener, void *data) | ||
21 | } | ||
22 | |||
23 | static void | ||
24 | -shell_surface_lose_keyboard_focus(struct shell_surface *shsurf) | ||
25 | +shell_surface_deactivate(struct shell_surface *shsurf) | ||
26 | { | ||
27 | if (--shsurf->focus_count == 0) | ||
28 | weston_desktop_surface_set_activated(shsurf->desktop_surface, false); | ||
29 | } | ||
30 | |||
31 | static void | ||
32 | -shell_surface_gain_keyboard_focus(struct shell_surface *shsurf) | ||
33 | +shell_surface_activate(struct shell_surface *shsurf) | ||
34 | { | ||
35 | if (shsurf->focus_count++ == 0) | ||
36 | weston_desktop_surface_set_activated(shsurf->desktop_surface, true); | ||
37 | @@ -1891,7 +1891,7 @@ handle_keyboard_focus(struct wl_listener *listener, void *data) | ||
38 | if (seat->focused_surface) { | ||
39 | struct shell_surface *shsurf = get_shell_surface(seat->focused_surface); | ||
40 | if (shsurf) | ||
41 | - shell_surface_lose_keyboard_focus(shsurf); | ||
42 | + shell_surface_deactivate(shsurf); | ||
43 | } | ||
44 | |||
45 | seat->focused_surface = weston_surface_get_main_surface(keyboard->focus); | ||
46 | @@ -1899,7 +1899,7 @@ handle_keyboard_focus(struct wl_listener *listener, void *data) | ||
47 | if (seat->focused_surface) { | ||
48 | struct shell_surface *shsurf = get_shell_surface(seat->focused_surface); | ||
49 | if (shsurf) | ||
50 | - shell_surface_gain_keyboard_focus(shsurf); | ||
51 | + shell_surface_activate(shsurf); | ||
52 | } | ||
53 | } | ||
54 | |||
55 | -- | ||
56 | 2.34.1 | ||
57 | |||