From 5f99b8045bd73cfc7b0dd27abca75970f1f1b614 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 5 Apr 2014 18:09:01 -0600 Subject: [PATCH] dtsession: screensaver don't pass random attributes to XScreenSaverSetAttributes() This should fix the "tiny window appearing in the screensavers" problem. --- cde/programs/dtsession/SmMain.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtsession/SmMain.c b/cde/programs/dtsession/SmMain.c index 3b65f753..c1213f81 100644 --- a/cde/programs/dtsession/SmMain.c +++ b/cde/programs/dtsession/SmMain.c @@ -669,7 +669,6 @@ RegisterX11ScreenSaver( int screen; Window root; XID xid; - XSetWindowAttributes attr; Atom type; if (XScreenSaverQueryExtension(display, pssEventType, &ssErrorBase) && @@ -695,13 +694,22 @@ RegisterX11ScreenSaver( if (result == 0) { + XSetWindowAttributes attr; + /* * Registration successful. */ XScreenSaverSelectInput(display, root, ScreenSaverNotifyMask|ScreenSaverCycleMask); + + /* Even though OverrideRedirect is the default attribute in this + * check, lets make sure it's set, and make sure only the + * CWOverrideRedirect attr is being looked at. The rest is + * just random garbage anyway, since it's allocated from the stack. + */ + attr.override_redirect = True; XScreenSaverSetAttributes(display, root, 0, 0, 1, 1, 0, CopyFromParent, - CopyFromParent, CopyFromParent, CWBackPixel, &attr); + CopyFromParent, CopyFromParent, CWOverrideRedirect, &attr); } } return(result); -- 2.25.1