From e4800e84d0604ee8eb2427601c1e28e31a584417 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Sat, 3 May 2008 19:30:42 -0300 Subject: [PATCH] Workaround for Composite problems when default depth is not 24. This is really a workaround patch, the proper fix would be to have WindowMaker know about Composite, and take advantage of it's features. --- src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.c b/src/main.c index d54a6315..c849de3c 100644 --- a/src/main.c +++ b/src/main.c @@ -852,6 +852,16 @@ real_main(int argc, char **argv) exit(1); } + if (wVisualID < 0) + /* + * If unspecified, use default visual instead of waiting + * for wrlib/context.c:bestContext() that may end up choosing + * the "fake" 24 bits added by the Composite extension. + * This is required to avoid all sort of corruptions when + * composite is enabled, and at a depth other than 24. + */ + wVisualID = (int)DefaultVisual(dpy, DefaultScreen(dpy))->visualid; + /* check if the user specified a complete display name (with screen). * If so, only manage the specified screen */ if (DisplayName) -- 2.11.4.GIT