summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wold <[email protected]>2020-11-11 14:51:52 -0800
committerraveit65 <[email protected]>2020-12-04 21:45:39 +0100
commit47475cbe71fbda5d8d2cb1ca59b624064f49840f (patch)
treeb948279553dd5a872506f6b9ff4766bc6370946c
parent6e075121cd8a7f6b7e20246eccc9586cef3834a6 (diff)
downloadmate-panel-47475cbe71fbda5d8d2cb1ca59b624064f49840f.tar.bz2
mate-panel-47475cbe71fbda5d8d2cb1ca59b624064f49840f.tar.xz
Don't enable transparency slider if not supported
-rw-r--r--mate-panel/panel-properties-dialog.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mate-panel/panel-properties-dialog.c b/mate-panel/panel-properties-dialog.c
index c5fc2c11..e9216bec 100644
--- a/mate-panel/panel-properties-dialog.c
+++ b/mate-panel/panel-properties-dialog.c
@@ -454,11 +454,21 @@ panel_properties_dialog_setup_opacity_scale (PanelPropertiesDialog *dialog,
G_CALLBACK (panel_properties_dialog_opacity_changed),
dialog);
+ gboolean slider_active = TRUE;
+
+ if ( ! gdk_screen_is_composited(gdk_screen_get_default())) {
+ slider_active = FALSE;
+ }
+
if ( ! panel_profile_background_key_is_writable (dialog->toplevel, "opacity")) {
+ slider_active = FALSE;
+ gtk_widget_show (dialog->writability_warn_background);
+ }
+
+ if ( ! slider_active) {
gtk_widget_set_sensitive (dialog->opacity_scale, FALSE);
gtk_widget_set_sensitive (dialog->opacity_label, FALSE);
gtk_widget_set_sensitive (dialog->opacity_legend, FALSE);
- gtk_widget_show (dialog->writability_warn_background);
}
}