Enable SaveUnder for the geometry tip so that we don't get those nasty unpainted

areas when moving/resizing the window in non-opaque modes.

For this to work properly have 'Option "backingstore"' set in the Screen
section of your XF86Config. (you can also do stuff like startx -- +bs if you
are too lazy to hack your X config)

I wonder how many distros will have 'Option "backingstore"' included by
default...

(I'll sync kwin_iii later during the 'big hack' :)

svn path=/trunk/kdebase/kwin/; revision=230927
This commit is contained in:
Karol Szwed 2003-06-11 13:05:44 +00:00
parent 3ea533d147
commit adb54b7767

View file

@ -5,6 +5,7 @@
*/
#include "geometrytip.h"
#include <X11/Xlib.h>
using namespace KWinInternal;
@ -13,6 +14,15 @@ GeometryTip::GeometryTip( const Client* client, const XSizeHints* xSizeHints ):
QLabel(NULL, "kwingeometry", WStyle_Customize | WStyle_StaysOnTop |
WStyle_NoBorder | WX11BypassWM )
{
// Enable SaveUnder so that we don't get those nasty unpainted
// areas when moving/resizing the window in non-opaque modes.
// For this to work properly have 'Option "backingstore"' set in the Screen
// section of your XF86Config. (some drivers may not support saveunder,
// oh well, we tried.)
XSetWindowAttributes wsa;
wsa.save_under = True;
XChangeWindowAttributes( qt_xdisplay(), winId(), CWSaveUnder, &wsa );
c = client;
setMargin(1);
setIndent(0);