@ -1220,8 +1220,14 @@ static void processEvent(XEvent *event)
case FocusIn :
case FocusIn :
{
{
if ( event - > xfocus . mode = = NotifyNormal )
if ( event - > xfocus . mode = = NotifyGrab | |
event - > xfocus . mode = = NotifyUngrab )
{
{
// Ignore focus events from popup indicator windows, window menu
// key chords and window dragging
return ;
}
if ( window - > x11 . ic )
if ( window - > x11 . ic )
XSetICFocus ( window - > x11 . ic ) ;
XSetICFocus ( window - > x11 . ic ) ;
@ -1229,15 +1235,20 @@ static void processEvent(XEvent *event)
if ( window - > cursorMode = = GLFW_CURSOR_DISABLED )
if ( window - > cursorMode = = GLFW_CURSOR_DISABLED )
disableCursor ( window ) ;
disableCursor ( window ) ;
}
return ;
return ;
}
}
case FocusOut :
case FocusOut :
{
{
if ( event - > xfocus . mode = = NotifyNormal )
if ( event - > xfocus . mode = = NotifyGrab | |
event - > xfocus . mode = = NotifyUngrab )
{
{
// Ignore focus events from popup indicator windows, window menu
// key chords and window dragging
return ;
}
if ( window - > x11 . ic )
if ( window - > x11 . ic )
XUnsetICFocus ( window - > x11 . ic ) ;
XUnsetICFocus ( window - > x11 . ic ) ;
@ -1245,7 +1256,6 @@ static void processEvent(XEvent *event)
if ( window - > cursorMode = = GLFW_CURSOR_DISABLED )
if ( window - > cursorMode = = GLFW_CURSOR_DISABLED )
restoreCursor ( window ) ;
restoreCursor ( window ) ;
}
return ;
return ;
}
}