mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtsession: screensaver don't pass random attributes to XScreenSaverSetAttributes()
This should fix the "tiny window appearing in the screensavers" problem.
This commit is contained in:
parent
38dfc9e235
commit
5f99b8045b
1 changed files with 10 additions and 2 deletions
|
@ -669,7 +669,6 @@ RegisterX11ScreenSaver(
|
||||||
int screen;
|
int screen;
|
||||||
Window root;
|
Window root;
|
||||||
XID xid;
|
XID xid;
|
||||||
XSetWindowAttributes attr;
|
|
||||||
Atom type;
|
Atom type;
|
||||||
|
|
||||||
if (XScreenSaverQueryExtension(display, pssEventType, &ssErrorBase) &&
|
if (XScreenSaverQueryExtension(display, pssEventType, &ssErrorBase) &&
|
||||||
|
@ -695,13 +694,22 @@ RegisterX11ScreenSaver(
|
||||||
|
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
{
|
{
|
||||||
|
XSetWindowAttributes attr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Registration successful.
|
* Registration successful.
|
||||||
*/
|
*/
|
||||||
XScreenSaverSelectInput(display, root,
|
XScreenSaverSelectInput(display, root,
|
||||||
ScreenSaverNotifyMask|ScreenSaverCycleMask);
|
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,
|
XScreenSaverSetAttributes(display, root, 0, 0, 1, 1, 0, CopyFromParent,
|
||||||
CopyFromParent, CopyFromParent, CWBackPixel, &attr);
|
CopyFromParent, CopyFromParent, CWOverrideRedirect, &attr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(result);
|
return(result);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue