diff --git a/src/Avalonia.X11/X11Window.cs b/src/Avalonia.X11/X11Window.cs index 85eda99418..41f3dd8387 100644 --- a/src/Avalonia.X11/X11Window.cs +++ b/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(); }