[metacity/wip/muktupavels/issue-26: 2/4] display: ensure that tab group does not include wrong windows
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/wip/muktupavels/issue-26: 2/4] display: ensure that tab group does not include wrong windows
- Date: Sun, 9 Oct 2022 15:25:09 +0000 (UTC)
commit 5689e0f0c54dd217e71dc3ebdc86e99903e9aabf
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Oct 9 14:07:49 2022 +0300
display: ensure that tab group does not include wrong windows
Make sure that we never put all windows in META_TAB_LIST_GROUP when
focus_window is NULL. And to compare if windows have same group use
meta_window_same_application.
src/core/display.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 4168a828..48692357 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -164,8 +164,6 @@ static void prefs_changed_callback (MetaPreference pref,
static void sanity_check_timestamps (MetaDisplay *display,
guint32 known_good_timestamp);
-MetaGroup* get_focussed_group (MetaDisplay *display);
-
/**
* Destructor for MetaPingData structs. Will destroy the
* event source for the struct as well.
@@ -4561,15 +4559,6 @@ meta_display_window_has_pending_pings (MetaDisplay *display,
return FALSE;
}
-MetaGroup*
-get_focussed_group (MetaDisplay *display)
-{
- if (display->focus_window)
- return display->focus_window->group;
- else
- return NULL;
-}
-
static inline gboolean
in_normal_tab_chain_type (MetaWindow *window)
{
@@ -4596,11 +4585,14 @@ in_tab_chain (MetaWindow *window,
}
else if (type == META_TAB_LIST_GROUP)
{
- MetaGroup *group;
+ MetaWindow *focus_window;
- group = get_focussed_group (window->display);
+ focus_window = window->display->focus_window;
+
+ if (focus_window == NULL)
+ return FALSE;
- if (group == NULL || meta_window_get_group (window) == group)
+ if (meta_window_same_application (window, focus_window))
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]