practically flickerfree without double buffering now (requies Qt-2.2 beta 2)
svn path=/trunk/kdebase/kwin/; revision=61028
This commit is contained in:
parent
5314dbb817
commit
97d6e48a3d
1 changed files with 17 additions and 16 deletions
|
@ -304,7 +304,7 @@ void KDEClient::slotReset()
|
||||||
|
|
||||||
KDEClient::KDEClient( Workspace *ws, WId w, QWidget *parent,
|
KDEClient::KDEClient( Workspace *ws, WId w, QWidget *parent,
|
||||||
const char *name )
|
const char *name )
|
||||||
: Client( ws, w, parent, name, WResizeNoErase )
|
: Client( ws, w, parent, name, WResizeNoErase | WNorthWestGravity )
|
||||||
{
|
{
|
||||||
create_pixmaps();
|
create_pixmaps();
|
||||||
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
|
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
|
||||||
|
@ -369,14 +369,15 @@ void KDEClient::resizeEvent( QResizeEvent* e)
|
||||||
|
|
||||||
doShape();
|
doShape();
|
||||||
calcHiddenButtons();
|
calcHiddenButtons();
|
||||||
if ( isVisibleToTLW() && !testWFlags( WNorthWestGravity )) {
|
if ( isVisibleToTLW() ) {
|
||||||
QPainter p( this );
|
int dx = 16 + QABS( e->oldSize().width() - width() );
|
||||||
QRect t = titlebar->geometry();
|
int dy = 16 + QABS( e->oldSize().height() - height() );
|
||||||
t.setTop( 0 );
|
update( 0, height() - dy + 1, width(), dy );
|
||||||
QRegion r = rect();
|
update( width() - dx + 1, 0, dx, height() );
|
||||||
r = r.subtract( t );
|
update( QRect( QPoint(4,4), titlebar->geometry().bottomLeft() - QPoint(1,0) ) );
|
||||||
p.setClipRegion( r );
|
update( QRect( titlebar->geometry().topRight(), QPoint( width() - 4, titlebar->geometry().bottom() ) ) );
|
||||||
p.eraseRect( rect() );
|
// titlebar needs no background
|
||||||
|
QApplication::postEvent( this, new QPaintEvent( titlebar->geometry(), FALSE ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue