svn path=/trunk/kdebase/kwin/; revision=293762
This commit is contained in:
Luboš Luňák 2004-03-05 14:22:11 +00:00
parent 458573e997
commit ff081c36a0
4 changed files with 19 additions and 4 deletions

View file

@ -1588,7 +1588,10 @@ void Client::setCursor( Position m )
setCursor( sizeHorCursor );
break;
default:
setCursor( arrowCursor );
if( buttonDown )
setCursor( sizeAllCursor );
else
setCursor( arrowCursor );
break;
}
}

View file

@ -1184,6 +1184,7 @@ void Client::processDecorationButtonPress( int button, int /*state*/, int x, int
moveOffset = QPoint( x, y );
invertedMoveOffset = rect().bottomRight() - moveOffset;
unrestrictedMoveResize = false;
setCursor( mode ); // update to sizeAllCursor if about to move
}
performMouseCommand( com, QPoint( x_root, y_root ));
}
@ -1237,8 +1238,8 @@ bool Client::buttonReleaseEvent( Window w, int /*button*/, int state, int x, int
// mouse position is still relative to old Client position, adjust it
QPoint mousepos( x_root - x, y_root - y );
mode = mousePosition( mousepos );
setCursor( mode );
}
setCursor( mode );
}
return true;
}
@ -1424,7 +1425,10 @@ void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction )
mode = convert[ direction ];
setCursor( mode );
if( !startMoveResize())
{
buttonDown = false;
setCursor( mode );
}
}
else if( direction == NET::KeyboardMove )
{ // ignore mouse coordinates given in the message, mouse position is used by the moving algorithm
@ -1467,10 +1471,12 @@ void Client::keyPressEvent( uint key_code )
case Key_Enter:
finishMoveResize( false );
buttonDown = FALSE;
setCursor( mode );
break;
case Key_Escape:
finishMoveResize( true );
buttonDown = FALSE;
setCursor( mode );
break;
default:
return;

View file

@ -1704,8 +1704,6 @@ bool Client::startMoveResize()
if( QApplication::activePopupWidget() != NULL )
return false; // popups have grab
bool has_grab = false;
if( mode == PositionCenter )
setCursor( sizeAllCursor ); // change from arrow cursor if moving
// This reportedly improves smoothness of the moveresize operation,
// something with Enter/LeaveNotify events, looks like XFree performance problem or something *shrug*
// (http://lists.kde.org/?t=107302193400001&r=1&w=2)
@ -1844,6 +1842,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
if( !startMoveResize())
{
buttonDown = false;
setCursor( mode );
return;
}
}

View file

@ -355,8 +355,12 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
invertedMoveOffset = rect().bottomRight() - moveOffset;
unrestrictedMoveResize = ( command == Options::MouseActivateRaiseAndUnrestrictedMove
|| command == Options::MouseUnrestrictedMove );
setCursor( mode );
if( !startMoveResize())
{
buttonDown = false;
setCursor( mode );
}
break;
}
case Options::MouseResize:
@ -383,7 +387,10 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
unrestrictedMoveResize = ( command == Options::MouseUnrestrictedResize );
setCursor( mode );
if( !startMoveResize())
{
buttonDown = false;
setCursor( mode );
}
break;
}
case Options::MouseMinimize: