Release the passive button grab for active inner windows, essentially
reverting the last two patches. Releasing the grab was actually a _feature_, not a bug. This is necessary to keep legacy applications running (e.g. some Motif apps). Unfortunately a replayed mouse event sometimes is not the same as the original event! This has the other nice benefit that you can activate a window without raising it by clicking onto the titlebar with LMB and use the window without it being raised. If this has problems with some new kicker behaviour, it's kicker that needs to be adjusted, not kwin. svn path=/trunk/kdebase/kwin/; revision=174276
This commit is contained in:
parent
df9d33de02
commit
9edf8b7563
1 changed files with 5 additions and 11 deletions
16
client.cpp
16
client.cpp
|
@ -266,13 +266,11 @@ static void ungrabButton( WId winId, int modifier )
|
|||
void WindowWrapper::setActive( bool active )
|
||||
{
|
||||
if ( active ) {
|
||||
// Don't release this grab because then we won't get the events
|
||||
// necessary for raising an active but not topmost windows
|
||||
// if ( options->focusPolicy == Options::ClickToFocus || !options->clickRaise )
|
||||
// ungrabButton( winId(), None );
|
||||
ungrabButton( winId(), ShiftMask );
|
||||
ungrabButton( winId(), ControlMask );
|
||||
ungrabButton( winId(), ControlMask | ShiftMask );
|
||||
if ( options->focusPolicy == Options::ClickToFocus || !options->clickRaise )
|
||||
ungrabButton( winId(), None );
|
||||
ungrabButton( winId(), ShiftMask );
|
||||
ungrabButton( winId(), ControlMask );
|
||||
ungrabButton( winId(), ControlMask | ShiftMask );
|
||||
} else {
|
||||
XGrabButton(qt_xdisplay(), AnyButton, AnyModifier, winId(), FALSE,
|
||||
ButtonPressMask,
|
||||
|
@ -2615,8 +2613,6 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
|
|||
workspace()->raiseClient( this );
|
||||
break;
|
||||
case Options::MouseActivateAndRaise:
|
||||
// We might already be active, in which case we want to pass the click on
|
||||
replay = isActive();
|
||||
workspace()->requestFocus( this );
|
||||
workspace()->raiseClient( this );
|
||||
break;
|
||||
|
@ -2625,8 +2621,6 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
|
|||
workspace()->lowerClient( this );
|
||||
break;
|
||||
case Options::MouseActivate:
|
||||
// We might already be active, in which case we want to pass the click on
|
||||
replay = isActive();
|
||||
workspace()->requestFocus( this );
|
||||
break;
|
||||
case Options::MouseActivateRaiseAndPassClick:
|
||||
|
|
Loading…
Reference in a new issue