GdkX11DeviceManagerXI2: handle focus events not on a known window
If we get a focus event for a X window we don't recognize, just ignore it and avoid a g-critical when _gdk_device_manager_core_handle_focus() is called with a NULL window.
This commit is contained in:
parent
645b5f398d
commit
06c4598fc5
@ -1568,6 +1568,8 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
break;
|
||||
case XI_FocusIn:
|
||||
case XI_FocusOut:
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
XIEnterEvent *xev = (XIEnterEvent *) ev;
|
||||
GdkDevice *device, *source_device;
|
||||
@ -1585,6 +1587,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
(ev->evtype == XI_FocusIn) ? TRUE : FALSE,
|
||||
xev->detail,
|
||||
xev->mode);
|
||||
}
|
||||
|
||||
return_val = FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user