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 breaks launchpad and menu bar #1221

Open anonymous133 opened 2 years ago

anonymous133 commented 2 years ago

Describe the bug Focus follows mouse seems to ignore launchpad and menu bar even though they are active and instead focuses the apps which are behind them which closes the launchpad and the menu bar and context menu of apps in the menu bar.

Applications:

Layout 3Column Middle

Left: Tidal Center: Safari Right: Photos

Menubar auto hide is ON

Screen resolution: 3440x1440

To Reproduce Steps to reproduce the behavior:

First 'bug'

  1. Enable Focus follows mouse.
  2. Open launchpad
  3. Go with mouse cursor to the outer bounds of the screen and the launchpad closes itself. For me I can't reach all apps since launchpad closes itself.

Second 'bug'

  1. Go to the menu bar so that it slides out
  2. Click on the Amethyst logo
  3. Try to open preferences
  4. I'm unable to go there with the mouse cursor since the context menu closes itself as soon as I try to reach any menu entry.

Expected behavior

Launchpad should not close itself. I think the mouse cursor activates a window laying behind launchpad, gets active and that closes launchpad.

The menu bar should be usable and not close itself.

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

Versions:

Debug Info

OS version: Version 12.2.1 (Build 21D62)

Screens:
    (0.0, 0.0, 3440.0, 1440.0) [(0.0, 0.0, 3440.0, 1440.0)]
    (3440.0, -137.0, 1440.0, 900.0) [(3440.0, 677.0, 1440.0, 900.0)]

Configuration:
screen-padding-bottom: 0
float-small-windows: 1
screen-padding-left: 0
floating-is-blacklist: 1
layouts: (
    "middle-wide"
)
window-margin-size: 14
mod1: (
    option,
    shift
)
restore-layouts-on-launch: 1
debug-layout-info: 0
window-margins: 1
window-minimum-height: 0
mod2: (
    option,
    shift,
    control
)
window-resize-step: 5
use-canary-build: 0
focus-follows-mouse: 0
floating: (
        {
        id = "com.valvesoftware.steam";
        "window-titles" =         (
        );
    },
        {
        id = "org.keepassxc.keepassxc";
        "window-titles" =         (
        );
    }
)
screen-padding-top: 0
mouse-swaps-windows: 1
screen-padding-right: 0
enables-layout-hud-on-space-change: 0
enables-layout-hud: 0
smart-window-margins: 1
follow-space-thrown-windows: 1
ignore-menu-bar: 1
mouse-follows-focus: 0
new-windows-to-main: 0
window-minimum-width: 0
michalrus commented 1 year ago

Same 👍

Also – seems slightly related – https://github.com/ianyh/Amethyst/issues/1399

rami3l commented 1 year ago

FWIW, this seems to be how yabai resolves this issue:

NOTE(koekeishiya): Look for a window with role AXSheet or AXDrawer and forward focus to it because we are not allowed to focus the main window in these cases.

https://github.com/koekeishiya/yabai/blob/a35ca917b5ba623bf11fe71a9999cd71f2d86487/src/event_loop.c#L1160-L1191


According to my experience with yabai, in practice we still need to activate https://github.com/ianyh/Amethyst/issues/395 sometimes, but hopefully much less often with this change implemented.