summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Bader <[email protected]>2020-05-26 21:01:28 +0100
committerVictor Kareh <[email protected]>2020-05-27 09:45:16 -0400
commit6bd23de6529ede9e8626263ecc39db3bf8aeb568 (patch)
tree8d4ebec61fc3dfcba97d56d3ea48a33acbf755c7
parentc16d44300d87c3dbd7bfde9b9d1c8f1a503694a3 (diff)
downloadmarco-6bd23de6529ede9e8626263ecc39db3bf8aeb568.tar.bz2
marco-6bd23de6529ede9e8626263ecc39db3bf8aeb568.tar.xz
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.
-rw-r--r--src/ui/tabpopup.c11
1 files changed, 10 insertions, 1 deletions
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);