ianyh / Amethyst

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

Focus Follows Mouse problems with floating windows #1026

Open bob-cb opened 4 years ago

bob-cb commented 4 years ago

Describe the bug When focus follows mouse mode is enabled, moving a mouse around a focused floating window maintains focus only if there is nothing or the tiled parent window underneath. As soon as the mouse moves to a point on the floating window that overlaps a tiled window, the tiled window steals the focus, and the floating window becomes hidden.

Applications: Many in my experience. But an example can be the MacOS Mail tool.

To Reproduce Open a Mail window that is a tiled in a slot on the right of a Tall layout. Go to the top header, right click and select "Custom Toolbar..". Now move around the Customize popup window, for example to select "Done". If the "Done" button is not overlapping the parent Mail window but lies on top of a another tiled window instead, the focus will switch to the underlying window before you get a chance to click "Done".

Maybe this example is a somehow special case of the Mail tool, but I seem to run into these cases where floating windows can't be viewed/clicked-on because the underlying window will steal focus. I can dig up some other examples if needed.

Expected behavior Focus should not be stolen by the underlying window unless the mouse goes off the edge of the floating window.

Screenshots If applicable, add screenshots to help explain your problem.

Versions:

Debug Info

Version: 0.15.3 (88)

OS version: Version 10.15.4 (Build 19E287)

Has permissions: false

Screens:
    (0.0, 0.0, 2560.0, 1440.0) [(0.0, 0.0, 2560.0, 1440.0)]

Manageable applications:
    ViewBridgeAuxiliary (com.apple.ViewBridgeAuxiliary)
    Safari (com.apple.Safari)
    OmniGraffle (com.omnigroup.OmniGraffle7)
    ViewBridgeAuxiliary (com.apple.ViewBridgeAuxiliary)
    talagent (com.apple.talagent)
    AppSSOAgent (com.apple.AppSSOAgent)
    Microsoft Excel (com.microsoft.Excel)
    QuickLookUIService (PID 509) (com.apple.quicklook.QuickLookUIService)
    Finder (com.apple.finder)
    ABP Control Panel (Safari) (org.adblockplus.adblockplussafarimac.AdblockPlusSafariToolbar)
    com.apple.Safari.SandboxBroker (Safari) (com.apple.Safari.SandboxBroker)
    Simulator (com.apple.CoreSimulator.SimulatorTrampoline)
    com.apple.CoreSimulator.CoreSimulatorService (com.apple.CoreSimulator.CoreSimulatorService)
    Viscosity (com.viscosityvpn.Viscosity)
    SiriNCService (com.apple.SiriNCService)
    studentd (com.apple.studentd)
    LookupViewService (Safari) (com.apple.LookupViewService)
    com.apple.appkit.xpc.openAndSavePanelService (Safari) (com.apple.appkit.xpc.openAndSavePanelService)
    QuickLookUIService (com.apple.appkit.xpc.openAndSavePanelService (Safari)) (com.apple.quicklook.QuickLookUIService)
    com.apple.RemotePDEService (Safari) (com.apple.RemotePDEService)
    UIKitSystem (com.apple.UIKitSystemApp)
    Preview (com.apple.Preview)
    CalNCService (com.apple.CalendarNotification.CalNCService)
    storeuid (com.apple.storeuid)
    Mail (com.apple.mail)
    Messages (com.apple.iChat)
    QuickLookUIService (Messages) (com.apple.quicklook.QuickLookUIService)
    Free42 (com.thomasokken.Free42)
    Slack (com.tinyspeck.slackmacgap)
    ThinLinc Client (se.cendio.tlclient)
    VNC Viewer (com.realvnc.vncviewer)
    VNC Viewer (com.realvnc.vncviewer)
    iTerm2 (com.googlecode.iterm2)

Configuration:
mod2: (
    option,
    shift,
    control
)
window-margins: 1
restore-layouts-on-launch: 1
ignore-menu-bar: 0
window-resize-step: 5
focus-follows-mouse: 1
mouse-follows-focus: 0
mouse-resizes-windows: 1
screen-padding-bottom: 0
screen-padding-top: 0
window-margin-size: 15
debug-layout-info: 0
new-windows-to-main: 1
screen-padding-right: 5
mouse-swaps-windows: 1
float-small-windows: 1
follow-space-thrown-windows: 1
enables-layout-hud: 1
floating: (
)
mod1: (
    option,
    shift
)
screen-padding-left: 0
floating-is-blacklist: 1
enables-layout-hud-on-space-change: 1
use-canary-build: 0
window-minimum-height: 0
layouts: (
    tall,
    wide,
    fullscreen,
    column,
    bsp,
    floating
)
window-minimum-width: 0

Additional context Awesome app, thanks for your work!

bob-cb commented 4 years ago

This seems related, but not exactly the same as https://github.com/ianyh/Amethyst/issues/1005.

ianyh commented 4 years ago

Yeah, that's fair. I think there needs to be a more holistic look at floating windows.