[fadb19bfbddde11ed6828a22e742cc97f5589ce48ac8ec8f94a6510ad5f16b8b/wip/exalm/focused-appearance: 301/304] stack: Check workspace in get_default_focus_window()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fadb19bfbddde11ed6828a22e742cc97f5589ce48ac8ec8f94a6510ad5f16b8b/wip/exalm/focused-appearance: 301/304] stack: Check workspace in get_default_focus_window()
- Date: Tue, 7 Jul 2020 20:50:02 +0000 (UTC)
commit 5fd90e85ed3b43bff2e0ddc99210c119ee29a7a3
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sat Oct 12 23:53:19 2019 +0500
stack: Check workspace in get_default_focus_window()
Check against the window argument, instead of active workspace.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/850
src/core/stack.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/core/stack.c b/src/core/stack.c
index f7e0f1b90d..bb14d7bd32 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -34,6 +34,7 @@
#include "core/frame.h"
#include "core/main-private.h"
#include "core/meta-workspace-manager-private.h"
+#include "core/workspace-private.h"
#include "core/window-private.h"
#include "meta/group.h"
#include "meta/prefs.h"
@@ -1016,7 +1017,8 @@ window_contains_point (MetaWindow *window,
}
static gboolean
-window_can_get_default_focus (MetaWindow *window)
+window_can_get_default_focus (MetaWindow *window,
+ MetaWorkspace *workspace)
{
if (window->unmaps_pending > 0)
return FALSE;
@@ -1027,7 +1029,10 @@ window_can_get_default_focus (MetaWindow *window)
if (!meta_window_is_focusable (window))
return FALSE;
- if (!meta_window_should_be_showing (window))
+ if (!meta_window_showing_on_its_workspace (window))
+ return FALSE;
+
+ if (!meta_window_located_on_workspace (window, workspace))
return FALSE;
if (window->type == META_WINDOW_DOCK)
@@ -1063,7 +1068,7 @@ get_default_focus_window (MetaStack *stack,
if (window == not_this_one)
continue;
- if (!window_can_get_default_focus (window))
+ if (!window_can_get_default_focus (window, workspace))
continue;
if (must_be_at_point && !window_contains_point (window, root_x, root_y))
@@ -1134,7 +1139,7 @@ meta_stack_get_default_focus_candidates (MetaStack *stack,
{
GList *next = l->next;
- if (!window_can_get_default_focus (l->data))
+ if (!window_can_get_default_focus (l->data, workspace))
windows = g_list_delete_link (windows, l);
l = next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]