From 3bf1edb8b9a3efe8accfab3c5810647d84af9ef3 Mon Sep 17 00:00:00 2001 From: Kai-Uwe Behrmann Date: Tue, 20 May 2014 11:40:53 +0200 Subject: disable shadows on 30-bit visuals --- src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 5012c4c..51bd0c8 100644 --- a/src/main.c +++ b/src/main.c @@ -17,6 +17,8 @@ * */ +#include + #ifdef HAVE_CONFIG_H #include #endif @@ -4740,6 +4742,7 @@ static XFixed *create_gaussian_kernel(double radius, static int update_shadow(frame_settings * fs) { Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + GdkVisual *visual = gdk_visual_get_best_with_depth(32); XRenderPictFormat *format; GdkPixmap *pixmap; Picture src, dst, tmp; @@ -4753,6 +4756,11 @@ static int update_shadow(frame_settings * fs) bzero(&d, sizeof(decor_t)); window_settings *ws = fs->ws; + // TODO shadows show strong artefacts with 30-bit setups + // meanwhile disable here as a workaround + if (gdk_visual_get_bits_per_rgb(visual) == 10) + ws->shadow_radius = 0; + // double save_decoration_alpha; static XRenderColor color; static XRenderColor clear = { 0x0000, 0x0000, 0x0000, 0x0000 }; -- cgit v1.1