From a815fc2f6e7f7fc00488b03c9d6614d179cca3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 24 Jul 2002 19:46:20 +0000 Subject: [PATCH] It wasn't an over-optimization, there was just a small bug elsewhere. svn path=/trunk/kdebase/kwin/; revision=168568 --- client.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/client.cpp b/client.cpp index b37f511b63..e01626ab16 100644 --- a/client.cpp +++ b/client.cpp @@ -1570,8 +1570,10 @@ void Client::resizeEvent( QResizeEvent * e) void Client::mouseMoveEvent( QMouseEvent * e) { if ( !buttonDown ) { - mode = mousePosition( e->pos() ); - setMouseCursor( mode ); + MousePosition newmode = mousePosition( e->pos() ); + if( newmode != mode ) + setMouseCursor( newmode ); + mode = newmode; geom = geometry(); return; } @@ -1691,6 +1693,8 @@ void Client::mouseMoveEvent( QMouseEvent * e) // QApplication::syncX(); // process our own configure events synchronously. } +// these two aren't called at all ... ?! + /*! Reimplemented to provide move/resize */ @@ -1703,8 +1707,6 @@ void Client::enterEvent( QEvent * ) */ void Client::leaveEvent( QEvent * ) { - if ( !buttonDown ) - setCursor( arrowCursor ); } @@ -2180,8 +2182,10 @@ bool Client::x11Event( XEvent * e) } if ( e->type == LeaveNotify && e->xcrossing.mode == NotifyNormal ) { - if ( !buttonDown ) + if ( !buttonDown ) { + mode = Nowhere; setCursor( arrowCursor ); + } bool lostMouse = !rect().contains( QPoint( e->xcrossing.x, e->xcrossing.y ) ); if ( lostMouse ) { delete autoRaiseTimer;