A modification to the resize handling. Not sure if it really

is any better but with khexedit it feels so. kwm still beats
it though :(

svn path=/trunk/kdebase/kwin/; revision=48903
This commit is contained in:
Espen Sand 2000-05-08 20:22:10 +00:00
parent e36274fecf
commit efdafdc528
2 changed files with 14 additions and 4 deletions

View file

@ -109,6 +109,8 @@ WindowWrapper::WindowWrapper( WId w, Client *parent, const char* name)
{
win = w;
timer = 0;
cnt = 0;
setMouseTracking( TRUE );
setBackgroundColor( colorGroup().background() );
@ -206,10 +208,16 @@ void WindowWrapper::resizeEvent( QResizeEvent * )
{
if ( win && reparented ) {
if ( isVisible() ) {
delete timer;
timer = new QTimer( this );
connect( timer, SIGNAL( timeout() ), this, SLOT( doResize() ) );
timer->start( 5, TRUE );
if( ++cnt > 3 ) {
doResize(); // Too many pending, do it now.
}
else {
delete timer;
timer = new QTimer( this );
connect( timer, SIGNAL( timeout() ),
this, SLOT( doResize() ) );
timer->start( 10, TRUE );
}
} else {
XMoveResizeWindow( qt_xdisplay(), win,
0, 0, width(), height() );
@ -221,6 +229,7 @@ void WindowWrapper::resizeEvent( QResizeEvent * )
void WindowWrapper::doResize()
{
cnt=0;
delete timer;
timer = 0;
XMoveResizeWindow( qt_xdisplay(), win,

View file

@ -48,6 +48,7 @@ private:
Time lastMouseEventTime;
bool reparented;
QTimer* timer;
int cnt;
};
inline WId WindowWrapper::window() const