summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai-Uwe Behrmann <ku.b@gmx.de>2014-05-20 11:40:53 +0200
committerScott Moreau <oreaus@gmail.com>2014-05-20 04:11:33 -0600
commit3bf1edb8b9a3efe8accfab3c5810647d84af9ef3 (patch)
tree9b5559b1df70c4525bf90634b59f6d456ff94e20
parent6d9bdaaa747247c8810d4ef53953cdd79deaa624 (diff)
downloademerald-master.tar.gz
emerald-master.tar.bz2
disable shadows on 30-bit visualsHEADmaster
-rw-r--r--src/main.c8
1 files changed, 8 insertions, 0 deletions
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 <gdk/gdk.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#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 };