practically flickerfree without double buffering now (requies Qt-2.2 beta 2)

svn path=/trunk/kdebase/kwin/; revision=61028
This commit is contained in:
Matthias Ettrich 2000-08-14 21:54:00 +00:00
parent 5314dbb817
commit 97d6e48a3d

View file

@ -304,7 +304,7 @@ void KDEClient::slotReset()
KDEClient::KDEClient( Workspace *ws, WId w, QWidget *parent,
const char *name )
: Client( ws, w, parent, name, WResizeNoErase )
: Client( ws, w, parent, name, WResizeNoErase | WNorthWestGravity )
{
create_pixmaps();
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
@ -369,14 +369,15 @@ void KDEClient::resizeEvent( QResizeEvent* e)
doShape();
calcHiddenButtons();
if ( isVisibleToTLW() && !testWFlags( WNorthWestGravity )) {
QPainter p( this );
QRect t = titlebar->geometry();
t.setTop( 0 );
QRegion r = rect();
r = r.subtract( t );
p.setClipRegion( r );
p.eraseRect( rect() );
if ( isVisibleToTLW() ) {
int dx = 16 + QABS( e->oldSize().width() - width() );
int dy = 16 + QABS( e->oldSize().height() - height() );
update( 0, height() - dy + 1, width(), dy );
update( width() - dx + 1, 0, dx, height() );
update( QRect( QPoint(4,4), titlebar->geometry().bottomLeft() - QPoint(1,0) ) );
update( QRect( titlebar->geometry().topRight(), QPoint( width() - 4, titlebar->geometry().bottom() ) ) );
// titlebar needs no background
QApplication::postEvent( this, new QPaintEvent( titlebar->geometry(), FALSE ) );
}
}