CT: coolo doesn't like it.

svn path=/trunk/kdebase/kwin/; revision=35053
This commit is contained in:
Cristian Tibirna 1999-11-26 01:24:52 +00:00
parent 9c2fd4530e
commit 68e807e756
2 changed files with 12 additions and 10 deletions

View file

@ -1372,33 +1372,35 @@ void Client::setShade( bool s )
shaded = s;
int as = options->animateShade()? options->animSteps() : 1;
if (shaded ) {
int h = height();
QSize s( sizeForWindowSize( QSize( windowWrapper()->width(), 0), TRUE ) );
windowWrapper()->hide();
repaint( FALSE ); // force direct repaint
setWFlags( WNorthWestGravity );
int step = QMAX( 15, QABS( h - s.height() ) / 20 )+1;
while ( h > s.height() + step ) {
int step = QMAX( 15, QABS( h - s.height() ) / as )+1;
do {
h -= step;
resize ( s.width(), h );
QApplication::syncX();
}
} while ( h > s.height() + step );
clearWFlags( WNorthWestGravity );
resize (s );
} else {
int h = height();
QSize s( sizeForWindowSize( windowWrapper()->size(), TRUE ) );
setWFlags( WNorthWestGravity );
int step = QMAX( 15, QABS( h - s.height() ) / 30 )+1;
while ( h < s.height() - step ) {
int step = QMAX( 15, QABS( h - s.height() ) / as )+1;
do {
h += step;
resize ( s.width(), h );
// assume a border
// we do not have time to wait for X to send us paint events
repaint( 0, h - step-5, width(), step+5, TRUE);
QApplication::syncX();
}
} while ( h < s.height() - step );
clearWFlags( WNorthWestGravity );
resize ( s );
windowWrapper()->show();

View file

@ -15,8 +15,8 @@ Options::Options()
//CT fix them for now. Will be read from rc
placement = Smart;
animate_shade = true;
anim_steps = 100;
animate_shade = false;
anim_steps = 20;
border_snap_zone = window_snap_zone = 10;
connect( kapp, SIGNAL( appearanceChanged() ), this, SLOT(reload() ) );
@ -152,9 +152,9 @@ void Options::reload()
else if (val == "Random") placement = Random;
else if (val == "Cascade") placement = Cascade;
animate_shade = config->readBoolEntry("AnimateShade", true);
animate_shade = config->readBoolEntry("AnimateShade", false);
anim_steps = config->readNumEntry("AnimSteps", 100);
anim_steps = config->readNumEntry("AnimSteps", 20);
border_snap_zone = config->readNumEntry("BorderSnapZone", 10);
window_snap_zone = config->readNumEntry("WindowSnapZone", 10);