HYL_OK3568_LINUX/yocto/meta-rockchip/recipes-graphics/wayland/weston_10.0.2/0072-desktop-shell-Avoid-lowering-the-requested-fullscree.patch
2025-05-10 21:49:39 +08:00

87 lines
3.2 KiB
Diff

From 9e3e9e3585879693df47719afa7bbd06f712e86b Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Fri, 24 Jun 2022 16:25:11 +0800
Subject: [PATCH 72/79] desktop-shell: Avoid lowering the requested fullscreen
surface
Don't lower itself.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
desktop-shell/exposay.c | 2 +-
desktop-shell/shell.c | 9 +++++----
desktop-shell/shell.h | 3 ++-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c
index c7c064b..0981f1a 100644
--- a/desktop-shell/exposay.c
+++ b/desktop-shell/exposay.c
@@ -646,7 +646,7 @@ exposay_transition_active(struct desktop_shell *shell)
shell->exposay.clicked = NULL;
wl_list_init(&shell->exposay.surface_list);
- lower_fullscreen_layer(shell, NULL);
+ lower_fullscreen_layer(shell, NULL, NULL);
shell->exposay.grab_kbd.interface = &exposay_kbd_grab;
weston_keyboard_start_grab(keyboard,
&shell->exposay.grab_kbd);
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index bea4d1d..d4879b2 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3747,7 +3747,8 @@ rotate_binding(struct weston_pointer *pointer, const struct timespec *time,
* the alt-tab switcher, which need to de-promote fullscreen layers. */
void
lower_fullscreen_layer(struct desktop_shell *shell,
- struct weston_output *lowering_output)
+ struct weston_output *lowering_output,
+ struct shell_surface *orig_shsurf)
{
struct workspace *ws;
struct weston_view *view, *prev;
@@ -3758,7 +3759,7 @@ lower_fullscreen_layer(struct desktop_shell *shell,
layer_link.link) {
struct shell_surface *shsurf = get_shell_surface(view->surface);
- if (!shsurf)
+ if (!shsurf || shsurf == orig_shsurf)
continue;
/* Only lower surfaces which have lowering_output as their fullscreen
@@ -3826,7 +3827,7 @@ activate(struct desktop_shell *shell, struct weston_view *view,
/* Only demote fullscreen surfaces on the output of activated shsurf.
* Leave fullscreen surfaces on unrelated outputs alone. */
if (shsurf->output)
- lower_fullscreen_layer(shell, shsurf->output);
+ lower_fullscreen_layer(shell, shsurf->output, shsurf);
if (view->surface->flags & SURFACE_NO_FOCUS)
goto no_focus;
@@ -4657,7 +4658,7 @@ switcher_binding(struct weston_keyboard *keyboard, const struct timespec *time,
wl_list_init(&switcher->listener.link);
wl_array_init(&switcher->minimized_array);
- lower_fullscreen_layer(switcher->shell, NULL);
+ lower_fullscreen_layer(switcher->shell, NULL, NULL);
switcher->grab.interface = &switcher_grab;
weston_keyboard_start_grab(keyboard, &switcher->grab);
weston_keyboard_set_focus(keyboard, NULL);
diff --git a/desktop-shell/shell.h b/desktop-shell/shell.h
index e0a0620..269648a 100644
--- a/desktop-shell/shell.h
+++ b/desktop-shell/shell.h
@@ -242,7 +242,8 @@ get_output_work_area(struct desktop_shell *shell,
void
lower_fullscreen_layer(struct desktop_shell *shell,
- struct weston_output *lowering_output);
+ struct weston_output *lowering_output,
+ struct shell_surface *orig_shsurf);
void
activate(struct desktop_shell *shell, struct weston_view *view,
--
2.20.1