[mutter/wip/exalm/focused-appearance: 2/5] stack: Check workspace in get_default_focus_window()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/exalm/focused-appearance: 2/5] stack: Check workspace in get_default_focus_window()
- Date: Sun, 13 Oct 2019 00:25:04 +0000 (UTC)
commit c8054b29bc75c208c6fae30b7f09fd0531ca72b8
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 | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/core/stack.c b/src/core/stack.c
index 7d144ee7d..d251c855f 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -1150,7 +1150,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;
@@ -1161,7 +1162,7 @@ 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_should_be_showing_on_workspace (window, workspace))
return FALSE;
if (window->type == META_WINDOW_DOCK)
@@ -1197,7 +1198,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))
@@ -1268,7 +1269,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]