Fix the flicker caused by unredirecting code - apparently setting the same
shape with X is not a no-op. svn path=/trunk/KDE/kdebase/workspace/; revision=854107
This commit is contained in:
parent
15ff73fabb
commit
19a9dd4095
2 changed files with 8 additions and 1 deletions
|
@ -409,9 +409,10 @@ void Workspace::setupOverlay( Window w )
|
|||
assert( overlay != None );
|
||||
assert( Extensions::shapeInputAvailable());
|
||||
XSetWindowBackgroundPixmap( display(), overlay, None );
|
||||
XShapeCombineRectangles( display(), overlay, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted );
|
||||
XRectangle rec = { 0, 0, displayWidth(), displayHeight() };
|
||||
XShapeCombineRectangles( display(), overlay, ShapeBounding, 0, 0, &rec, 1, ShapeSet, Unsorted );
|
||||
XShapeCombineRectangles( display(), overlay, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted );
|
||||
overlay_shape = QRegion( 0, 0, displayWidth(), displayHeight());
|
||||
if( w != None )
|
||||
{
|
||||
XSetWindowBackgroundPixmap( display(), w, None );
|
||||
|
@ -488,6 +489,11 @@ void Workspace::delayedCheckUnredirect()
|
|||
if( c->unredirected())
|
||||
reg -= c->geometry();
|
||||
}
|
||||
// Avoid setting the same shape again, it causes flicker (apparently it is not a no-op
|
||||
// and triggers something).
|
||||
if( reg == overlay_shape )
|
||||
return;
|
||||
overlay_shape = reg;
|
||||
QVector< QRect > rects = reg.rects();
|
||||
XRectangle* xrects = new XRectangle[ rects.count() ];
|
||||
for( int i = 0;
|
||||
|
|
|
@ -739,6 +739,7 @@ class Workspace : public QObject, public KDecorationDefines
|
|||
Window overlay; // XComposite overlay window
|
||||
bool overlay_visible;
|
||||
bool overlay_shown; // for showOverlay()
|
||||
QRegion overlay_shape;
|
||||
QSlider *transSlider;
|
||||
QPushButton *transButton;
|
||||
QTimer unredirectTimer;
|
||||
|
|
Loading…
Reference in a new issue