From 2dc0f48a22f97787e8afa46d38f78b36b227106f Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 31 Jan 2024 16:12:59 +0100 Subject: [PATCH] window tracker: Adapt to renamed function Ideally, the use case we have for MetaGroup would be removed but that requires investigation that could be done as a future step The function also expects a MetaWindowX11, so add a check to ensure we don't crash at runtime if the function gets called on a wayland client Also removes an unused header import Part-of: --- src/shell-app-usage.c | 1 - src/shell-window-tracker.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/shell-app-usage.c b/src/shell-app-usage.c index aaaabd989..ad40040d9 100644 --- a/src/shell-app-usage.c +++ b/src/shell-app-usage.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include "shell-app-usage.h" diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c index 6a7240e47..2e3e2dae5 100644 --- a/src/shell-window-tracker.c +++ b/src/shell-window-tracker.c @@ -313,7 +313,7 @@ get_app_from_window_group (ShellWindowTracker *tracker, MetaGroup *group; GSList *iter; - group = meta_window_get_group (window); + group = meta_window_x11_get_group (window); if (group == NULL) return NULL; @@ -463,7 +463,7 @@ get_app_for_window (ShellWindowTracker *tracker, /* If we didn't get a startup-notification match, see if we matched * any other windows in the group. */ - if (result == NULL) + if (result == NULL && meta_window_get_client_type (window) == META_WINDOW_CLIENT_TYPE_X11) result = get_app_from_window_group (tracker, window); /* Our last resort - we create a fake app from the window */