Add a hack that somewhat improves screen repaint after X session

switch with drivers that have a problem with this.
CCBUG: 154825


svn path=/trunk/KDE/kdebase/workspace/; revision=783860
This commit is contained in:
Luboš Luňák 2008-03-09 20:06:11 +00:00
parent 97ecd7f796
commit cda4477458
2 changed files with 7 additions and 2 deletions

View file

@ -477,8 +477,13 @@ bool Workspace::workspaceEvent( XEvent * e )
case VisibilityNotify: case VisibilityNotify:
if( compositing() && overlay != None && e->xvisibility.window == overlay ) if( compositing() && overlay != None && e->xvisibility.window == overlay )
{ {
bool was_visible = overlay_visible;
overlay_visible = ( e->xvisibility.state != VisibilityFullyObscured ); overlay_visible = ( e->xvisibility.state != VisibilityFullyObscured );
addRepaintFull(); if( !was_visible && overlay_visible )
{ // hack for #154825
addRepaintFull();
QTimer::singleShot( 2000, this, SLOT( addRepaintFull()));
}
} }
break; break;
default: default:

View file

@ -314,7 +314,6 @@ class Workspace : public QObject, public KDecorationDefines
// either Toplevel::addRepaint() or Toplevel::addWorkspaceRepaint() // either Toplevel::addRepaint() or Toplevel::addWorkspaceRepaint()
void addRepaint( const QRect& r ); void addRepaint( const QRect& r );
void addRepaint( int x, int y, int w, int h ); void addRepaint( int x, int y, int w, int h );
void addRepaintFull();
// creates XComposite overlay window, call initOverlay() afterwards // creates XComposite overlay window, call initOverlay() afterwards
bool createOverlay(); bool createOverlay();
// init overlay and the destination window in it // init overlay and the destination window in it
@ -324,6 +323,7 @@ class Workspace : public QObject, public KDecorationDefines
Window overlayWindow(); Window overlayWindow();
public slots: public slots:
void addRepaintFull();
void refresh(); void refresh();
// keybindings // keybindings
void slotSwitchDesktopNext(); void slotSwitchDesktopNext();