1.11.5 Dropdown/context menus expose AXWindow role + AXDialog subrole, breaking window manager focus handling

*** Please report new bugs here! ***

Moderators: xnview, Dreamer

prokoma
Posts: 1
Joined: Tue Jul 14, 2026 4:48 pm

1.11.5 Dropdown/context menus expose AXWindow role + AXDialog subrole, breaking window manager focus handling

Post by prokoma »

I'm using XnViewMP 1.11.5 on macOS 26.5.1.

XnView MP's dropdown lists (e.g. combo boxes) and context menus are exposed via macOS Accessibility as AXRole = AXWindow with AXSubrole = AXDialog. Because these are reported as real windows rather than as transient menu/popup elements, third-party window managers that use the Accessibility API to enumerate windows (e.g. yabai) pick them up as regular, manageable windows. This breaks focus_follows_mouse and other window-management behavior, since the WM tries to treat a transient dropdown/context menu as if it were a normal application window.

Expected behavior
Transient popups like dropdowns and context menus should not be exposed as AXWindow/AXDialog. In macOS accessibility terms they should typically be reported as AXMenu/AXMenuItem (for context menus) or as non-activating popup/panel elements that are not flagged as root windows — the same way native Cocoa NSMenu-backed popups behave. This is also how well-behaved Qt apps' native QMenu popups usually appear.

Actual behavior
The dropdown is reported with (yabai -m query --windows):

Code: Select all

{
  "role":"AXWindow",
  "subrole":"AXDialog",
  "root-window":true,
  "level":101,
  "is-floating":true,
  "can-move":true,
  ...
}
This causes yabai (and presumably other AX-based WMs/utilities) to treat it as a real, focus-eligible window. Combined with focus_follows_mouse, this makes the main window lose focus and close the dropdown when trying to hover over it.