* Gerry Lawrence <gwlp...@gmail.com> [2010-12-21 20:05]:
> Focus follows mouse - which I can get on any unix, easily, and
> any microsoft, with a little more effort, is impossible on the
> MAC.

It's actually *technically impossible* to implement Focus Follows
Mouse on MacOS. Do you want to know why? It's because of the menu
bar at the top of the screen.

* 
<http://steve-yegge.blogspot.com/2008/04/settling-osx-focus-follows-mouse-debate.html>:
> The problem is that Macs, always and forever, have put the menu
> bar of the focused application at the top of the screen. The
> menu bars of unfocused applications are hidden and are not in
> any way user-interactible.
>
> As you might expect, this UI assumption has been baked into the
> Mac APIs from the very beginning. Programmers will take
> advantage of any axiom they can in order to get things working,
> so over time this has turned from a UI design assumption into
> an architectural "feature".
>
> In particular, when an app is in the background, its menu
> structure may not be intact, and the app may be in a state that
> assumes it will not be receiving any keyboard input. One
> concrete example mentioned in the thread was that when an app
> is in the background, the child menu items do not have parent
> links (although the parents still have pointers to the
> children).
>
> This has serious ramifications for focus-follows-mouse. There
> are certain built-in hotkeys that can activate menu entries,
> and apps are also free to define their own. If you try to
> activate a menu in a background application, it could in theory
> wind up crashing the app, if the app is assuming an intact menu
> structure and is traversing bottom-up rather than top-down.
>
> You could attempt a knee-jerk solution by allowing Control and
> Alt through, but deny the Command modifier, since that's the
> most common menu-activation modifier (I think). But there's
> another class of applications (Emacs included) that dynamically
> generates at least part of its menu structure based on the data
> content. For instance, the Emacs Imenu package generates a list
> of jump targets from a source-code buffer. Even typing a new
> function definition could still trigger a rebuild of the IMenu,
> which (for all anyone knows) could crash Emacs.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to