summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2020-10-10 15:03:41 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2020-10-10 15:03:41 +0300
commitf033b5b498bf9e7193d6e0eb1c29071a303251a3 (patch)
tree30f16bb4731c1b7bb47f507d31d596c893ee0b4e /src/core/window.c
parent0d658d4d7bfef994c2123839e7dc35cf164dceda (diff)
downloadmetacity-f033b5b498bf9e7193d6e0eb1c29071a303251a3.tar.gz
stack: don't ignore workspace in get_default_focus_window
Commit 00b3e2af07a3 stopped using workspace argument. Redo that change to use passed in workspace instead of assuming it is always active workspace.
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/core/window.c b/src/core/window.c
index c3a091f3..da2a2590 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1479,24 +1479,24 @@ meta_window_showing_on_its_workspace (MetaWindow *window)
}
gboolean
-meta_window_should_be_showing (MetaWindow *window)
+meta_window_should_be_showing_on_workspace (MetaWindow *window,
+ MetaWorkspace *workspace)
{
gboolean on_workspace;
meta_verbose ("Should be showing for window %s\n", window->desc);
/* See if we're on the workspace */
- on_workspace = meta_window_located_on_workspace (window,
- window->screen->active_workspace);
+ on_workspace = meta_window_located_on_workspace (window, workspace);
if (!on_workspace)
meta_verbose ("Window %s is not on workspace %d\n",
window->desc,
- meta_workspace_index (window->screen->active_workspace));
+ meta_workspace_index (workspace));
else
- meta_verbose ("Window %s is on the active workspace %d\n",
+ meta_verbose ("Window %s is on workspace %d\n",
window->desc,
- meta_workspace_index (window->screen->active_workspace));
+ meta_workspace_index (workspace));
if (window->on_all_workspaces)
meta_verbose ("Window %s is on all workspaces\n", window->desc);
@@ -1504,6 +1504,16 @@ meta_window_should_be_showing (MetaWindow *window)
return on_workspace && meta_window_showing_on_its_workspace (window);
}
+gboolean
+meta_window_should_be_showing (MetaWindow *window)
+{
+ MetaWorkspace *active_workspace;
+
+ active_workspace = window->screen->active_workspace;
+
+ return meta_window_should_be_showing_on_workspace (window, active_workspace);
+}
+
static void
implement_showing (MetaWindow *window,
gboolean showing)