From 6bd23de6529ede9e8626263ecc39db3bf8aeb568 Mon Sep 17 00:00:00 2001 From: William Bader Date: Tue, 26 May 2020 21:01:28 +0100 Subject: In the pop-up workspace switcher, show the selected workspace with a dark color when compositing is disabled. Updates #566 which changed the selected workspace to a light color on a light background. --- src/ui/tabpopup.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/tabpopup.c b/src/ui/tabpopup.c index 999ab6f9..fe7107dd 100644 --- a/src/ui/tabpopup.c +++ b/src/ui/tabpopup.c @@ -1126,7 +1126,16 @@ meta_select_workspace_draw (GtkWidget *widget, gtk_style_context_set_state (context, gtk_widget_get_state_flags (widget)); - meta_gtk_style_get_light_color (context, GTK_STATE_FLAG_SELECTED, &color); + if (meta_prefs_get_compositing_manager ()) + { + /* 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); + } + else + { + /* non-compositing creates a light background: show the selection in a dark color */ + meta_gtk_style_get_dark_color (context, GTK_STATE_FLAG_SELECTED, &color); + } cairo_set_line_width (cr, SELECT_OUTLINE_WIDTH); cairo_set_source_rgb (cr, color.red, color.green, color.blue); -- cgit v1.2.1