summaryrefslogtreecommitdiff
path: root/src/ui/tabpopup.c
diff options
context:
space:
mode:
authorMihai Moldovan <[email protected]>2023-07-28 20:27:28 +0200
committerraveit65 <[email protected]>2023-08-17 21:50:32 +0200
commit645c83a4755db32d68a4b0ec27fe9dddd9f92e07 (patch)
tree01d4d95b36c86a1550a4dec31128d5aa3f44291f /src/ui/tabpopup.c
parentdc4a2863dd402b052edce27e441503751619b024 (diff)
downloadmarco-645c83a4755db32d68a4b0ec27fe9dddd9f92e07.tar.bz2
marco-645c83a4755db32d68a4b0ec27fe9dddd9f92e07.tar.xz
ui/tabpopup: likewise only enable compositing code if available.
Diffstat (limited to 'src/ui/tabpopup.c')
-rw-r--r--src/ui/tabpopup.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui/tabpopup.c b/src/ui/tabpopup.c
index d3b9ba62..57973fb0 100644
--- a/src/ui/tabpopup.c
+++ b/src/ui/tabpopup.c
@@ -30,6 +30,7 @@
#include "tabpopup.h"
#include "theme.h"
#include "prefs.h"
+#include "screen.h"
/* FIXME these two includes are 100% broken... */
#include "../core/workspace.h"
#include "../core/frame-private.h"
@@ -235,6 +236,7 @@ tab_entry_new (const MetaTabEntry *entry,
MetaTabPopup*
meta_ui_tab_popup_new (const MetaTabEntry *entries,
+ MetaScreen *meta_screen,
int entry_count,
int width,
gboolean expand_for_titles,
@@ -285,7 +287,8 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
gtk_window_set_resizable (GTK_WINDOW (popup->window), TRUE);
/* This style should only be set for composited mode. */
- if (meta_prefs_get_compositing_manager ())
+ if (meta_prefs_get_compositing_manager () && meta_screen &&
+ !!(meta_display_get_compositor (meta_screen_get_display (meta_screen))))
{
frame_shadow = GTK_SHADOW_NONE;
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (popup->window)),
@@ -1117,13 +1120,15 @@ meta_select_workspace_draw (GtkWidget *widget,
{
GtkStyleContext *context;
GdkRGBA color;
+ MetaScreen *screen = META_SELECT_WORKSPACE (widget)->workspace->screen;
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_state (context,
gtk_widget_get_state_flags (widget));
- if (meta_prefs_get_compositing_manager ())
+ if (meta_prefs_get_compositing_manager () && screen &&
+ !!(meta_display_get_compositor (meta_screen_get_display (screen))))
{
/* compositing manager creates a dark background: show the selection in a light color */
meta_gtk_style_get_light_color (context, GTK_STATE_FLAG_SELECTED, &color);