It seems to be, that the rule ought to be:

  • “if the operator’s mouse/keyboard event which originally spawned the new window is still the last one generated, then it may grab focus”

In other words, if the user is WAITING on a window to pop up, then it takes focus. But otherwise (such as the user typing in another document) it does NOT take focus.

Of course, in this context, I refer to only key-down and mouse-down events, not passive events like mouse movement.

  • lurch (he/him)@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    It’s not always clear what event created child windows.

    However, it is solved in many compositors / window managers. For example, per default Gnome will not focus a window from another app than the one you’re using and show a notification instead.