Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application menu is unusable when application is not on the monitor that contains menubar #594

Open
3 tasks done
katafractari opened this issue Oct 14, 2024 · 6 comments
Open
3 tasks done

Comments

@katafractari
Copy link

I have a multi monitor setup with center monitor being the main one with the MacOS menubar and the left and right ones being secondary ones. In the attached video you can see the menubar on the main monitor. The secondary monitor is not included because the default MacOS screen capture tool doesn't seem to support multi monitor setup. What you see on the video is the following:

  • I move the mouse left to the secondary monitor, where an Aerospace workspace with kitty terminal is located
  • I click kitty to gain focus (or switch to that workspace with a keyboard shortcut, does not matter)
  • I got back to the main monitor and try to use kitty's menu
  • kitty's menu is immediatelly closed and the menu from Chrome, which is on the workspace on the main monitor is shown

We should be able to use the menu for application on all monitors.

❯ aerospace debug-windows
net.kovidgoyal.kitty.window.54 windowId: 54
net.kovidgoyal.kitty.window.54 workspace: T
net.kovidgoyal.kitty.window.54 treeNodeParent: AppBundle.TilingContainer
net.kovidgoyal.kitty.window.54 recognizedAsDialog: false
net.kovidgoyal.kitty.window.54 AXTitle: Optional(zsh)
net.kovidgoyal.kitty.window.54 AXRole: Optional(AXWindow)
net.kovidgoyal.kitty.window.54 AXSubrole: Optional(AXStandardWindow)
net.kovidgoyal.kitty.window.54 AXFocused: Optional(0)
net.kovidgoyal.kitty.window.54 AXFullScreen: Optional(0)
net.kovidgoyal.kitty.window.54 AXFrame: Optional(<AXValue 0x600000865f40> {value = x:-2560.000000 y:-197.000000 w:2560.000000 h:1439.000000 type = kAXValueCGRectType})
net.kovidgoyal.kitty.window.54 AXPosition: Optional(<AXValue 0x600001cb9530> {value = x:-2560.000000 y:-197.000000 type = kAXValueCGPointType})
net.kovidgoyal.kitty.window.54 AXGrowArea: nil
net.kovidgoyal.kitty.window.54 AXMinimizeButton: nil
net.kovidgoyal.kitty.window.54 AXDocument: nil
net.kovidgoyal.kitty.window.54 AXSections: [
net.kovidgoyal.kitty.window.54         Optional({
net.kovidgoyal.kitty.window.54             SectionDescription = Content;
net.kovidgoyal.kitty.window.54             SectionObject = "<AXUIElement 0x600001cba4c0> {pid=1310}";
net.kovidgoyal.kitty.window.54             SectionUniqueID = AXContent;
net.kovidgoyal.kitty.window.54         })
net.kovidgoyal.kitty.window.54 ]
net.kovidgoyal.kitty.window.54 AXCloseButton: nil
net.kovidgoyal.kitty.window.54 AXMain: Optional(1)
net.kovidgoyal.kitty.window.54 AXActivationPoint: Optional(<AXValue 0x600001ddef70> {value = x:-1.000000 y:1441.000000 type = kAXValueCGPointType})
net.kovidgoyal.kitty.window.54 AXFullScreenButton: nil
net.kovidgoyal.kitty.window.54 AXProxy: nil
net.kovidgoyal.kitty.window.54 AXDefaultButton: nil
net.kovidgoyal.kitty.window.54 AXMinimized: Optional(0)
net.kovidgoyal.kitty.window.54 AXParent: Optional(<AXUIElement Application 0x600001cb9530> {pid=1310})
net.kovidgoyal.kitty.window.54 AXTitleUIElement: nil
net.kovidgoyal.kitty.window.54 AXCancelButton: nil
net.kovidgoyal.kitty.window.54 AXModal: Optional(0)
net.kovidgoyal.kitty.window.54 AXZoomButton: nil
net.kovidgoyal.kitty.window.54 AXSize: Optional(<AXValue 0x600001ddef70> {value = w:2560.000000 h:1439.000000 type = kAXValueCGSizeType})
net.kovidgoyal.kitty.window.54 AXToolbarButton: nil
net.kovidgoyal.kitty.window.54 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
net.kovidgoyal.kitty           AXRole: Optional(AXApplication)
net.kovidgoyal.kitty           AXTitle: Optional(kitty)
net.kovidgoyal.kitty           AXFunctionRowTopLevelElements: [
net.kovidgoyal.kitty           ]
net.kovidgoyal.kitty           AXFrame: nil
net.kovidgoyal.kitty           AXFocusedUIElement: AXUIElement(windowId=54, title=nil, role="AXTextArea", subrole=nil)
net.kovidgoyal.kitty           AXFrontmost: Optional(1)
net.kovidgoyal.kitty           AXExtrasMenuBar: nil
net.kovidgoyal.kitty           AXMainWindow: AXUIElement(windowId=54, title="zsh", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty           AXFocusedWindow: AXUIElement(windowId=54, title="zsh", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty           AXMenuBar: Optional(<AXUIElement 0x600001cb9e30> {pid=1310})
net.kovidgoyal.kitty           AXWindows: [
net.kovidgoyal.kitty               AXUIElement(windowId=54, title="zsh", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty           ]
net.kovidgoyal.kitty           AXSize: nil
net.kovidgoyal.kitty           AXPosition: nil
net.kovidgoyal.kitty           Ignored: AXChildren, AXChildrenInNavigationOrder, AXEnhancedUserInterface, AXPreferredLanguage, AXRoleDescription, AXHidden

!!! DISCLAIMER !!!
!!! 'debug-windows' command is not stable API. Please don't rely on the command existence and output format !!!
!!! The only intended use case is to report bugs about incorrect windows handling !!!

Debug session finished

My config

# Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking

# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []

# You can use it to add commands that run after AeroSpace startup.
# 'after-startup-command' is run after 'after-login-command'
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
after-startup-command = []

# Start AeroSpace at login
start-at-login = false

# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true

# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
# The 'accordion-padding' specifies the size of accordion padding
# You can set 0 to disable the padding feature
accordion-padding = 0

# Possible values: tiles|accordion
default-root-container-layout = 'tiles'

# Possible values: horizontal|vertical|auto
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
#               tall monitor (anything higher than wide) gets vertical orientation
default-root-container-orientation = 'auto'

# Mouse follows focus when focused monitor changes
# Drop it from your config, if you don't like this behavior
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
# Fallback value (if you omit the key): on-focused-monitor-changed = []
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']

# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app
automatically-unhide-macos-hidden-apps = false

# Possible values: (qwerty|dvorak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping]
preset = 'qwerty'

# Gaps between windows (inner-*) and between monitor edges (outer-*).
# Possible values:
# - Constant:     gaps.outer.top = 8
# - Per monitor:  gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
#                 In this example, 24 is a default value when there is no match.
#                 Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
#                 See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
[gaps]
inner.horizontal = 0
inner.vertical =   0
outer.left =       0
outer.bottom =     0
outer.top =        0
outer.right =      0

# 'main' binding mode declaration
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
# 'main' binding mode must be always presented
# Fallback value (if you omit the key): mode.main.binding = {}
[mode.main.binding]

# All possible keys:
# - Letters.        a, b, c, ..., z
# - Numbers.        0, 1, 2, ..., 9
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
# - F-keys.         f1, f2, ..., f20
# - Special keys.   minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
#                   leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
#                   keypadMinus, keypadMultiply, keypadPlus
# - Arrows.         left, down, up, right

# All possible modifiers: cmd, alt, ctrl, shift

# All possible commands: https://nikitabobko.github.io/AeroSpace/commands

# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
# alt-enter = '''exec-and-forget osascript -e '
# tell application "Terminal"
#     do script
#     activate
# end tell'
# '''

# See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-period = 'layout tiles horizontal vertical'
alt-comma = 'layout accordion horizontal vertical'

# See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'

# See: https://nikitabobko.github.io/AeroSpace/commands#move
alt-shift-h = 'move left'
alt-shift-j = 'move down'
alt-shift-k = 'move up'
alt-shift-l = 'move right'

# See: https://nikitabobko.github.io/AeroSpace/commands#resize
alt-shift-minus = 'resize smart -50'
alt-shift-equal = 'resize smart +50'

# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
alt-a = 'workspace A' # In your config, you can drop workspace bindings that you don't need
alt-b = 'workspace B'
alt-c = 'workspace C'
alt-d = 'workspace D'
alt-e = 'workspace E'
alt-f = 'workspace F'
alt-g = 'workspace G'
alt-i = 'workspace I'
alt-m = 'workspace M'
alt-n = 'workspace N'
alt-o = 'workspace O'
alt-p = 'workspace P'
alt-q = 'workspace Q'
alt-r = 'workspace R'
alt-s = 'workspace S'
alt-t = 'workspace T'
alt-u = 'workspace U'
alt-v = 'workspace V'
alt-w = 'workspace W'
alt-x = 'workspace X'
alt-y = 'workspace Y'
alt-z = 'workspace Z'

# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
alt-shift-a = 'move-node-to-workspace A'
alt-shift-b = 'move-node-to-workspace B'
alt-shift-c = 'move-node-to-workspace C'
alt-shift-d = 'move-node-to-workspace D'
alt-shift-e = 'move-node-to-workspace E'
alt-shift-f = 'move-node-to-workspace F'
alt-shift-g = 'move-node-to-workspace G'
alt-shift-i = 'move-node-to-workspace I'
alt-shift-m = 'move-node-to-workspace M'
alt-shift-n = 'move-node-to-workspace N'
alt-shift-o = 'move-node-to-workspace O'
alt-shift-p = 'move-node-to-workspace P'
alt-shift-q = 'move-node-to-workspace Q'
alt-shift-r = 'move-node-to-workspace R'
alt-shift-s = 'move-node-to-workspace S'
alt-shift-t = 'move-node-to-workspace T'
alt-shift-u = 'move-node-to-workspace U'
alt-shift-v = 'move-node-to-workspace V'
alt-shift-w = 'move-node-to-workspace W'
alt-shift-x = 'move-node-to-workspace X'
alt-shift-y = 'move-node-to-workspace Y'
alt-shift-z = 'move-node-to-workspace Z'

# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
alt-tab = 'workspace-back-and-forth'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'

# See: https://nikitabobko.github.io/AeroSpace/commands#mode
alt-shift-0 = 'mode service'

# 'service' binding mode declaration.
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
[mode.service.binding]
esc = ['reload-config', 'mode main']
r = ['flatten-workspace-tree', 'mode main'] # reset layout
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
backspace = ['close-all-windows-but-current', 'mode main']

# sticky is not yet supported https:/nikitabobko/AeroSpace/issues/2
#s = ['layout sticky tiling', 'mode main']

alt-shift-h = ['join-with left', 'mode main']
alt-shift-j = ['join-with down', 'mode main']
alt-shift-k = ['join-with up', 'mode main']
alt-shift-l = ['join-with right', 'mode main']

# Event listeners

## Browsers
[[on-window-detected]]
if.window-title-regex-substring = 'Chrome Personal'
run = 'move-node-to-workspace P'

[[on-window-detected]]
if.window-title-regex-substring = 'Chrome Work'
run = 'move-node-to-workspace K'

[[on-window-detected]]
if.app-id = 'org.mozilla.firefox'
run = 'move-node-to-workspace A'

## IDE
[[on-window-detected]]
if.app-id = 'com.jetbrains.intellij'
run = 'move-node-to-workspace I'

## Terminal
[[on-window-detected]]
if.app-id = 'net.kovidgoyal.kitty'
run = 'move-node-to-workspace T'

## AI
[[on-window-detected]]
if.app-id = 'com.openai.chat'
run = ['layout floating', 'move-node-to-workspace G']

## Notes
[[on-window-detected]]
if.app-id = 'md.obsidian'
run = 'move-node-to-workspace N'

## Music
[[on-window-detected]]
if.app-id = 'com.spotify.client'
run = 'move-node-to-workspace S'

## Finder
[[on-window-detected]]
if.app-id = 'com.apple.finder'
run = 'move-node-to-workspace E'

## Postman
[[on-window-detected]]
if.app-id = 'com.postmanlabs.mac'
run = 'move-node-to-workspace R'

## Signal
[[on-window-detected]]
if.app-id = 'com.tinyspeck.slackmacgap'
run = ['layout floating', 'move-node-to-workspace W']

## Zoom
[[on-window-detected]]
if.app-id = 'us.zoom.xos'
run = 'move-node-to-workspace Z'

## Miro
[[on-window-detected]]
if.app-id = 'com.electron.realtimeboard'
run = 'move-node-to-workspace O'

## Chat
[[on-window-detected]]
if.app-id = 'org.whispersystems.signal-desktop'
run = 'move-node-to-workspace C'

[[on-window-detected]]
if.app-id = 'net.whatsapp.WhatsApp'
run = 'move-node-to-workspace C'

# Home Monitor Layout
# left 'DELL P2720DC (1)'
# center 'DELL P2720DC (2)'
# right 'built-in'

# Office Monitor Layour
# right DELL 4K-TBD
# left 'built-in'

[workspace-to-monitor-force-assignment]
C = 'built-in'
T = ['DELL P2720DC \(1\)', 'built-in']
I = 'DELL P2720DC \(2\)'
K = 'DELL P2720DC \(2\)'
P = 'DELL P2720DC \(2\)'
A = 'DELL P2720DC \(1\)'
G = 'DELL P2720DC \(1\)'
N = 'DELL P2720DC \(1\)'
S = 'built-in'
Z = 'built-in'

Checklist

❯ aerospace --version
aerospace CLI client version: 0.15.2-Beta b6cf82771f245ab7349a93baf8709e171537ff58
AeroSpace.app server version: 0.15.2-Beta b6cf82771f245ab7349a93baf8709e171537ff58
aerospace-menubar-bug.mov
@ParisTheProgrammer
Copy link
Sponsor

For troubleshooting purposes, can you share whether you have "Displays have separate spaces" enabled or disabled?

MacOS 15: Settings -> Desktop & Dock -> Mission Control -> Displays have separate spaces

https://nikitabobko.github.io/AeroSpace/guide#a-note-on-displays-have-separate-spaces

@katafractari
Copy link
Author

I have it disabled.

OS version is 15.0.1

@teki
Copy link

teki commented Oct 14, 2024

I have the same issue after upgrading to 15.0.1
Activating applications on the Dock does not show and focus them anymore.

@teki
Copy link

teki commented Oct 15, 2024

One more thing: Kill Dock fixed the issue. Will check if the issue persistent with reboots.

@katafractari
Copy link
Author

Killing Dock with killall -9 Dock did not help.

@cor
Copy link

cor commented Oct 16, 2024

Same here, as a workaround you can keep the mouse button down and move to the item you want to click, then release on that item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants