core: Guard MetaGroup usage

For now, we just guard part of the group header as it is
consumed by gnome-shell. Ideally, we would drop that use case and make
the whole header private.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3555>
This commit is contained in:
Bilal Elmoussaoui
2024-01-22 17:59:34 +01:00
parent 43351b483f
commit f0c22cb3bc
8 changed files with 61 additions and 36 deletions

View File

@ -36,11 +36,14 @@
#include "core/meta-workspace-manager-private.h"
#include "core/window-private.h"
#include "core/workspace-private.h"
#include "meta/group.h"
#include "meta/prefs.h"
#include "meta/workspace.h"
#ifdef HAVE_X11_CLIENT
#include "meta/group.h"
#include "x11/meta-x11-display-private.h"
#include "x11/window-x11.h"
#endif
#define WINDOW_TRANSIENT_FOR_WHOLE_GROUP(w) \
(meta_window_has_transient_type (w) && w->transient_for == NULL)
@ -502,6 +505,7 @@ create_constraints (Constraint **constraints,
continue;
}
#ifdef HAVE_X11_CLIENT
if (WINDOW_TRANSIENT_FOR_WHOLE_GROUP (w))
{
GSList *group_windows;
@ -550,7 +554,9 @@ create_constraints (Constraint **constraints,
g_slist_free (group_windows);
}
else if (w->transient_for != NULL)
else
#endif
if (w->transient_for != NULL)
{
MetaWindow *parent;