Browse Source

X11Window should probably ignore X11 grab focus events (#15686)

pull/15706/head
walterlv 2 years ago
committed by GitHub
parent
commit
22434f2df0
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      src/Avalonia.X11/X11Window.cs

6
src/Avalonia.X11/X11Window.cs

@ -453,11 +453,17 @@ namespace Avalonia.X11
{
if (ActivateTransientChildIfNeeded())
return;
// See: https://github.com/fltk/fltk/issues/295
if ((NotifyMode)ev.FocusChangeEvent.mode is not NotifyMode.NotifyNormal)
return;
Activated?.Invoke();
_imeControl?.SetWindowActive(true);
}
else if (ev.type == XEventName.FocusOut)
{
// See: https://github.com/fltk/fltk/issues/295
if ((NotifyMode)ev.FocusChangeEvent.mode is not NotifyMode.NotifyNormal)
return;
_imeControl?.SetWindowActive(false);
Deactivated?.Invoke();
}

Loading…
Cancel
Save