removed the timerbased resize stuff again and did the real fix.
Should work fine with Qt-2.1, please test. svn path=/trunk/kdebase/kwin/; revision=48970
This commit is contained in:
parent
eb9d29938b
commit
9c4e19ee40
3 changed files with 5 additions and 39 deletions
28
client.cpp
28
client.cpp
|
@ -108,8 +108,6 @@ WindowWrapper::WindowWrapper( WId w, Client *parent, const char* name)
|
|||
: QWidget( parent, name )
|
||||
{
|
||||
win = w;
|
||||
timer = 0;
|
||||
cnt = 0;
|
||||
|
||||
setMouseTracking( TRUE );
|
||||
|
||||
|
@ -207,35 +205,13 @@ QSizePolicy WindowWrapper::sizePolicy() const
|
|||
void WindowWrapper::resizeEvent( QResizeEvent * )
|
||||
{
|
||||
if ( win && reparented ) {
|
||||
if ( isVisible() ) {
|
||||
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() );
|
||||
}
|
||||
XMoveResizeWindow( qt_xdisplay(), win,
|
||||
0, 0, width(), height() );
|
||||
if ( ((Client*)parentWidget())->shape() )
|
||||
((Client*)parentWidget())->updateShape();
|
||||
}
|
||||
}
|
||||
|
||||
void WindowWrapper::doResize()
|
||||
{
|
||||
cnt=0;
|
||||
delete timer;
|
||||
timer = 0;
|
||||
XMoveResizeWindow( qt_xdisplay(), win,
|
||||
0, 0, width(), height() );
|
||||
}
|
||||
|
||||
|
||||
void WindowWrapper::showEvent( QShowEvent* )
|
||||
{
|
||||
if ( win ) {
|
||||
|
|
6
client.h
6
client.h
|
@ -40,15 +40,11 @@ protected:
|
|||
void hideEvent( QHideEvent* );
|
||||
bool x11Event( XEvent * ); // X11 event
|
||||
|
||||
private slots:
|
||||
void doResize();
|
||||
|
||||
|
||||
private:
|
||||
WId win;
|
||||
Time lastMouseEventTime;
|
||||
bool reparented;
|
||||
QTimer* timer;
|
||||
int cnt;
|
||||
};
|
||||
|
||||
inline WId WindowWrapper::window() const
|
||||
|
|
10
main.cpp
10
main.cpp
|
@ -118,12 +118,6 @@ bool Application::x11EventFilter( XEvent *e )
|
|||
case PropertyNotify:
|
||||
kwin_time = e->xproperty.time;
|
||||
break;
|
||||
case ConfigureNotify:
|
||||
{
|
||||
if ( e->xconfigure.window != e->xconfigure.event )
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -150,8 +144,8 @@ void Application::saveState( QSessionManager& sm )
|
|||
}
|
||||
|
||||
sm.release();
|
||||
|
||||
// we really should do phase 2 here, unfortunately qt-2.1beta3 contains a bug.
|
||||
|
||||
// we really should do phase 2 here, unfortunately qt-2.1beta3 contains a bug.
|
||||
// #######TODO FIXME with final Qt-2.1
|
||||
/*
|
||||
if ( !sm.isPhase2() ) {
|
||||
|
|
Loading…
Reference in a new issue