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:
Matthias Ettrich 2002-08-28 12:24:10 +00:00
parent df9d33de02
commit 9edf8b7563

View file

@ -266,10 +266,8 @@ 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 );
if ( options->focusPolicy == Options::ClickToFocus || !options->clickRaise )
ungrabButton( winId(), None );
ungrabButton( winId(), ShiftMask );
ungrabButton( winId(), ControlMask );
ungrabButton( winId(), ControlMask | ShiftMask );
@ -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: