Show the composite overlay window only before the first painting pass
actually needs to flush the output to the screen. Avoids windows temporarily disappearing during KDE startup or similar visual glitches. svn path=/trunk/KDE/kdebase/workspace/; revision=806387
This commit is contained in:
parent
19c6ce9075
commit
53cc35b649
5 changed files with 18 additions and 4 deletions
|
@ -372,14 +372,20 @@ void Workspace::setupOverlay( Window w )
|
|||
assert( Extensions::shapeInputAvailable());
|
||||
XShapeCombineRectangles( display(), overlay, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted );
|
||||
if( w != None )
|
||||
{
|
||||
XShapeCombineRectangles( display(), w, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted );
|
||||
XMapWindow( display(), w );
|
||||
}
|
||||
XMapRaised( display(), overlay );
|
||||
XSelectInput( display(), overlay, VisibilityChangeMask );
|
||||
}
|
||||
|
||||
void Workspace::showOverlay()
|
||||
{
|
||||
assert( overlay != None );
|
||||
if( overlay_shown )
|
||||
return;
|
||||
XMapSubwindows( display(), overlay );
|
||||
XMapWindow( display(), overlay );
|
||||
overlay_shown = true;
|
||||
}
|
||||
|
||||
void Workspace::destroyOverlay()
|
||||
{
|
||||
if( overlay == None )
|
||||
|
@ -388,6 +394,7 @@ void Workspace::destroyOverlay()
|
|||
XCompositeReleaseOverlayWindow( display(), overlay );
|
||||
#endif
|
||||
overlay = None;
|
||||
overlay_shown = false;
|
||||
}
|
||||
|
||||
//****************************************
|
||||
|
|
|
@ -638,6 +638,8 @@ void SceneOpenGL::waitSync()
|
|||
// actually paint to the screen (double-buffer swap or copy from pixmap buffer)
|
||||
void SceneOpenGL::flushBuffer( int mask, QRegion damage )
|
||||
{
|
||||
if( wspace->overlayWindow()) // show the window only after the first pass, since
|
||||
wspace->showOverlay(); // that pass may take long
|
||||
if( db )
|
||||
{
|
||||
if( mask & PAINT_SCREEN_REGION )
|
||||
|
|
|
@ -170,6 +170,8 @@ void SceneXrender::paint( QRegion damage, ToplevelList toplevels )
|
|||
}
|
||||
int mask = 0;
|
||||
paintScreen( &mask, &damage );
|
||||
if( wspace->overlayWindow()) // show the window only after the first pass, since
|
||||
wspace->showOverlay(); // that pass may take long
|
||||
if( mask & PAINT_SCREEN_REGION )
|
||||
{
|
||||
// Use the damage region as the clip region for the root window
|
||||
|
|
|
@ -137,6 +137,7 @@ Workspace::Workspace( bool restore )
|
|||
compositeRate( 0 ),
|
||||
overlay( None ),
|
||||
overlay_visible( true ),
|
||||
overlay_shown( false ),
|
||||
transSlider( NULL ),
|
||||
transButton( NULL )
|
||||
{
|
||||
|
|
|
@ -318,6 +318,7 @@ class Workspace : public QObject, public KDecorationDefines
|
|||
bool createOverlay();
|
||||
// init overlay and the destination window in it
|
||||
void setupOverlay( Window window );
|
||||
void showOverlay();
|
||||
// destroys XComposite overlay window
|
||||
void destroyOverlay();
|
||||
Window overlayWindow();
|
||||
|
@ -723,6 +724,7 @@ class Workspace : public QObject, public KDecorationDefines
|
|||
QRegion repaints_region;
|
||||
Window overlay; // XComposite overlay window
|
||||
bool overlay_visible;
|
||||
bool overlay_shown; // for showOverlay()
|
||||
QSlider *transSlider;
|
||||
QPushButton *transButton;
|
||||
|
||||
|
|
Loading…
Reference in a new issue