Reset Client::buttonDown if startMoveResize() failed
due to not being able to grab input. Visible with resizing the shortcut configure dialog, which has grab. svn path=/trunk/kdebase/kwin/; revision=269293
This commit is contained in:
parent
fe0ab6d200
commit
162c76cf46
3 changed files with 15 additions and 6 deletions
|
@ -1315,7 +1315,8 @@ void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction )
|
||||||
unrestrictedMoveResize = false;
|
unrestrictedMoveResize = false;
|
||||||
mode = convert[ direction ];
|
mode = convert[ direction ];
|
||||||
setCursor( mode );
|
setCursor( mode );
|
||||||
startMoveResize();
|
if( !startMoveResize())
|
||||||
|
buttonDown = false;
|
||||||
}
|
}
|
||||||
else if( direction == NET::KeyboardMove )
|
else if( direction == NET::KeyboardMove )
|
||||||
{ // ignore mouse coordinates given in the message, mouse position is used by the moving algorithm
|
{ // ignore mouse coordinates given in the message, mouse position is used by the moving algorithm
|
||||||
|
|
12
geometry.cpp
12
geometry.cpp
|
@ -1445,10 +1445,10 @@ static EatAllPaintEvents* eater = 0;
|
||||||
bool Client::startMoveResize()
|
bool Client::startMoveResize()
|
||||||
{
|
{
|
||||||
assert( !moveResizeMode );
|
assert( !moveResizeMode );
|
||||||
if( mode == Center )
|
|
||||||
setCursor( sizeAllCursor ); // change from arrow cursor if moving
|
|
||||||
if( !grabInput())
|
if( !grabInput())
|
||||||
return false;
|
return false;
|
||||||
|
if( mode == Center )
|
||||||
|
setCursor( sizeAllCursor ); // change from arrow cursor if moving
|
||||||
if ( maximizeMode() != MaximizeRestore )
|
if ( maximizeMode() != MaximizeRestore )
|
||||||
resetMaximize();
|
resetMaximize();
|
||||||
moveResizeMode = true;
|
moveResizeMode = true;
|
||||||
|
@ -1514,7 +1514,13 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
|
||||||
{
|
{
|
||||||
QPoint p( QPoint( x, y ) - moveOffset );
|
QPoint p( QPoint( x, y ) - moveOffset );
|
||||||
if (p.manhattanLength() >= 6)
|
if (p.manhattanLength() >= 6)
|
||||||
startMoveResize();
|
{
|
||||||
|
if( !startMoveResize())
|
||||||
|
{
|
||||||
|
buttonDown = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,7 +354,8 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
|
||||||
invertedMoveOffset = rect().bottomRight() - moveOffset;
|
invertedMoveOffset = rect().bottomRight() - moveOffset;
|
||||||
unrestrictedMoveResize = ( command == Options::MouseActivateRaiseAndUnrestrictedMove
|
unrestrictedMoveResize = ( command == Options::MouseActivateRaiseAndUnrestrictedMove
|
||||||
|| command == Options::MouseUnrestrictedMove );
|
|| command == Options::MouseUnrestrictedMove );
|
||||||
startMoveResize();
|
if( !startMoveResize())
|
||||||
|
buttonDown = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Options::MouseResize:
|
case Options::MouseResize:
|
||||||
|
@ -380,7 +381,8 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
|
||||||
invertedMoveOffset = rect().bottomRight() - moveOffset;
|
invertedMoveOffset = rect().bottomRight() - moveOffset;
|
||||||
unrestrictedMoveResize = ( command == Options::MouseUnrestrictedResize );
|
unrestrictedMoveResize = ( command == Options::MouseUnrestrictedResize );
|
||||||
setCursor( mode );
|
setCursor( mode );
|
||||||
startMoveResize();
|
if( !startMoveResize())
|
||||||
|
buttonDown = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Options::MouseMinimize:
|
case Options::MouseMinimize:
|
||||||
|
|
Loading…
Reference in a new issue