output/input device selection menus appear with an offset.
On Wayland compositors (sway in my case) the output and input device selection menus appear with an offset when working with more than one monitor.
With only 1 enabled output it works as expected:
As soon as you connect a second output with a fixed absolute position this happens:
How to reproduce:
Assign a second output a fixed position and disable the first output.
# swaymsg output HDMI-A-1 position 1366 0
# swaymsg output eDP-1 disable
# swaymsg -t get_outputs
Output HDMI-A-1 'Unknown HP E243 CNK9030QM3' (focused)
Current mode: 1920x1080 @ 60.000000 Hz
Position: 1366,0
Scale factor: 1.000000
Subpixel hinting: unknown
Transform: normal
Workspace: 3:files
Available modes:
[ removed for readability ]
1920x1080 @ 60.000000 Hz
Output eDP-1 'Unknown 0x04E3 0x00000000' (inactive)
Available modes:
1366x768 @ 59.993000 Hz
Output eDP-1 is disabled, HDMI-A-1 stays at position 1366,0.
Tooltips and menus appear with an offset (see picture 2)
Possible solution
Discussed here: https://github.com/swaywm/sway/issues/3135#issuecomment-448794177
Short version: gtk_menu_popup() has been deprecated since version 3.22 see https://developer.gnome.org/gtk3/stable/GtkMenu.html#gtk-menu-popup
Thank you.