Commit 87c609e7 authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

Use RGBA visual only if compositing is enabled (Fixes #251)

parent e75c9827
Pipeline #15502 passed with stages
in 4 minutes and 25 seconds
......@@ -451,11 +451,9 @@ panel_base_window_screen_changed (GtkWidget *widget, GdkScreen *previous_screen)
/* set the rgba colormap if supported by the screen */
screen = gtk_window_get_screen (GTK_WINDOW (window));
visual = gdk_screen_get_rgba_visual (screen);
if (visual != NULL)
{
gtk_widget_set_visual (widget, visual);
window->is_composited = gdk_screen_is_composited (screen);
}
if (visual != NULL && window->is_composited)
gtk_widget_set_visual (widget, visual);
panel_debug (PANEL_DEBUG_BASE_WINDOW,
"%p: rgba visual=%p, compositing=%s", window,
......
......@@ -798,7 +798,7 @@ systray_manager_set_visual (SystrayManager *manager)
visual = gdk_screen_get_rgba_visual (screen);
panel_debug (PANEL_DEBUG_SYSTRAY, "rgba visual is %p", visual);
if (visual != NULL)
if (visual != NULL && gdk_screen_is_composited (screen))
{
/* use the rgba visual */
xvisual = GDK_VISUAL_XVISUAL (visual);
......
......@@ -80,7 +80,7 @@ wrapper_plug_init (WrapperPlug *plug)
/* set the colormap */
screen = gtk_window_get_screen (GTK_WINDOW (plug));
visual = gdk_screen_get_rgba_visual (screen);
if (visual != NULL)
if (visual != NULL && gdk_screen_is_composited (screen))
gtk_widget_set_visual (GTK_WIDGET (plug), visual);
/* set the panel class */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment