some focus follows mouse stuff
svn path=/trunk/kdebase/kwin/; revision=60885
This commit is contained in:
parent
dc9fb7dc2b
commit
81bd6b26c3
3 changed files with 18 additions and 8 deletions
|
@ -195,7 +195,8 @@ WindowWrapper::WindowWrapper( WId w, Client *parent, const char* name)
|
|||
|
||||
XSelectInput( qt_xdisplay(), w,
|
||||
FocusChangeMask |
|
||||
PropertyChangeMask
|
||||
PropertyChangeMask |
|
||||
EnterWindowMask | LeaveWindowMask
|
||||
);
|
||||
|
||||
// install a passive grab to catch mouse button events
|
||||
|
@ -1702,6 +1703,7 @@ bool Client::x11Event( XEvent * e)
|
|||
workspace()->requestFocus( this );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ( e->type == LeaveNotify && e->xcrossing.mode == NotifyNormal ) {
|
||||
if ( !buttonDown )
|
||||
setCursor( arrowCursor );
|
||||
|
@ -1715,6 +1717,7 @@ bool Client::x11Event( XEvent * e)
|
|||
workspace()->requestFocus( 0 ) ;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
4
main.cpp
4
main.cpp
|
@ -45,8 +45,8 @@ static DCOPClient * client = 0;
|
|||
static void crashHandler(int)
|
||||
{
|
||||
KCrash::setCrashHandler(0); // Exit on next crash.
|
||||
delete client; client = 0; // Unregister with dcop.
|
||||
system("kwin&"); // Try to restart
|
||||
client->detach(); // Unregister with dcop.
|
||||
// system("kwin&"); // Try to restart
|
||||
}
|
||||
|
||||
int x11ErrorHandler(Display *d, XErrorEvent *e){
|
||||
|
|
|
@ -470,6 +470,12 @@ bool Workspace::workspaceEvent( XEvent * e )
|
|||
}
|
||||
break;
|
||||
case EnterNotify:
|
||||
qDebug("EnterNotify");
|
||||
{
|
||||
QWidget* w = QWidget::find( e->xcrossing.window );
|
||||
if (w )
|
||||
qDebug("w = %s", w->className() );
|
||||
}
|
||||
if ( !QWhatsThis::inWhatsThisMode() )
|
||||
break;
|
||||
{
|
||||
|
@ -479,6 +485,7 @@ bool Workspace::workspaceEvent( XEvent * e )
|
|||
}
|
||||
break;
|
||||
case LeaveNotify:
|
||||
qDebug("LeaveNotify");
|
||||
if ( !QWhatsThis::inWhatsThisMode() )
|
||||
break;
|
||||
c = findClientWidthId( e->xcrossing.window );
|
||||
|
|
Loading…
Reference in a new issue