[Xfce4-commits] [xfce/xfce4-panel] 01/01: Fix unreadable panel items without compositing (Bug #14842)
noreply at xfce.org
noreply at xfce.org
Fri Nov 23 22:43:50 CET 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-panel.
commit 60bb559af477341f53a1d508e4a77f7659f6b56d
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Fri Nov 23 22:43:31 2018 +0100
Fix unreadable panel items without compositing (Bug #14842)
If the "leave-opacity" is defined then disabling compositing results
in the panel being drawn with wrong colors. The widget opacity will
somehow still be taken into consideration and results in almost
unreadable icons and text.
We work around this problem by making sure the "leave opacity" is always
100% visibility without compositing and remembering the original value
so we can restore it if compositing is re-enabled and the panel hasn't been
restarted meanwhile.
---
panel/panel-base-window.c | 13 ++++++++++++-
panel/panel-base-window.h | 1 +
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/panel/panel-base-window.c b/panel/panel-base-window.c
index 5ddc26c..5d5db6d 100644
--- a/panel/panel-base-window.c
+++ b/panel/panel-base-window.c
@@ -525,12 +525,23 @@ panel_base_window_composited_changed (GtkWidget *widget)
if (window->is_composited)
{
+ if (window->leave_opacity != window->leave_opacity_old)
+ window->leave_opacity = window->leave_opacity_old;
gtk_widget_set_opacity (GTK_WIDGET (widget), window->leave_opacity);
panel_base_window_set_plugin_data (window,
panel_base_window_set_plugin_leave_opacity);
}
-
+ else
+ {
+ /* make sure that the leave opacity is always disabled without compositing, but
+ remember the original value so we can reset it if compositing gets re-enabled */
+ window->leave_opacity_old = window->leave_opacity;
+ window->leave_opacity = 1.0;
+ gtk_widget_set_opacity (GTK_WIDGET (widget), window->leave_opacity);
+ panel_base_window_set_plugin_data (window,
+ panel_base_window_set_plugin_leave_opacity);
+ }
panel_debug (PANEL_DEBUG_BASE_WINDOW,
"%p: compositing=%s", window,
PANEL_DEBUG_BOOL (window->is_composited));
diff --git a/panel/panel-base-window.h b/panel/panel-base-window.h
index 0e131a2..24f2f68 100644
--- a/panel/panel-base-window.h
+++ b/panel/panel-base-window.h
@@ -74,6 +74,7 @@ struct _PanelBaseWindow
/* transparency settings */
gdouble enter_opacity;
gdouble leave_opacity;
+ gdouble leave_opacity_old;
};
GType panel_base_window_get_type (void) G_GNUC_CONST;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list