* Source/x11/XGServerEvent.m (processEvent:):

do not change focus in GNUstep backend if FocusOut event received
  with any modes not equal to NotifyNormal. Workspace sends FocusOut
  event in NotifyNormal mode to notify GNUstep window about changed
  focus.

  Rationale: when window manager (Workspace) makes workspace switch
  GNUstep part of Workspace receives FocusOut events to window with
  id 0 (None). It produces multiple focus switches between main menu
  and (unmapped) File Viewer window with main menu flickering if
  there are no opened applications on target workspace. To omit that
  flickering GNUstep backend should ignore FocusOut events in grabbed
  modes (NotifyGrab, NotifyUngrab, NotifyWhileGrabbed) and Workspace
  WM should send FocusOut event to GNUstep window in NotifyNormal mode
  to handle real focus switch.
This commit is contained in:
Sergii Stoian 2020-09-16 13:29:05 +03:00
parent d2a7b41dd9
commit 8b7a41ae8b

View file

@ -1273,6 +1273,12 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
nswin = GSWindowWithNumber(cWin->number);
}
}
else if (xEvent.xfocus.mode != NotifyNormal)
{
/* Focus went to `None` or `PointerRoot`.
Do not change window focus - window manager is in action */
break;
}
else
{
nswin = nil;