ianyh / Amethyst

Automatic tiling window manager for macOS à la xmonad.
https://ianyh.com/amethyst/
MIT License
14.68k stars 486 forks source link

Weird focus control problem in Tall layout #315

Open TreyBlancher opened 9 years ago

TreyBlancher commented 9 years ago

I normally have three windows open on a space: MacVim, and two iTerm2 windows. I use the Tall layout, with both iTerm2 windows on the left and a tall MacVim window on the right. The problem comes in focusing the top iTerm2 window (or any of two windows stacked on top of each other). If I try to give focus to the top window, either through the keyboard control, or by moving or clicking the mouse in it (I have Focus Follows Mouse and Mouse Follows Focused Windows enabled), the focus will move to the top window only for a few milliseconds. The window on the bottom will immediately have focus. I normally have to give focus to the tall window (MacVim), for the top iTerm2 window to gain focus.

It gets even better! I can give my desired window focus by clicking the mouse, but if I move the mouse pointer at all after clicking (not even over another window), the focus switches to the bottom window. It's really annoying. Focus Follows Mouse is almost perfect except for this. This isn't limited to iTerm2 (which has other Focus Follows Mouse problems)

Probably a corollary to this is if a window opens a popup that doesn't show under the normal window list (e.g., a Google Calendar popup alert from Chrome), the same thing happens. Due to Apple's infinitesimal wisdom in forcing auto-raise on any focused window, these popups become hidden and difficult to focus.

Trello Card

TreyBlancher commented 9 years ago

I've now noticed that this problem makes a full screen window appear over floating windows, no matter how many times I try to give it focus. I have to use a Keyboard Maestro keyboard short cut several times, even with the mouse cursor over the window, before the floating windows stay on top so I can interact with it. Seems like precisely the same problem as the one described above, focus always going to the master pane/panel/window, even though I've tried to give focus to another (in this case, floating) window.

ianyh commented 9 years ago

I would expect Focus Follows Mouse and Mouse Follows Focus (ugh, why didn't I name those better) to interact very strangely, but it is also the case that Focus Follows Mouse has a host of issues that haven't been resolved. I'll try to get these reproduced.