Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.0
-
archlinux, with sway as a wayland compositor.
-
-
a46795a22e (qt/qtwayland/dev) a46795a22e (qt/tqtc-qtwayland/dev) 1a07779a25 (qt/qtwayland/6.4) 1a07779a25 (qt/tqtc-qtwayland/6.4) 1a07779a25 (qt/tqtc-qtwayland/6.4.1)
Description
When I use a qt application and try to open a menu, the position of the menu is offset by an amount equal to the offset of the display output the parent window is on. Specifically, the position returned by the `logical_position` of the `zxdg_output_v1`.
Experimenting with this it seems that values passed to `set_anchor_rect` for the popup positioner are always the max of the logical_position and the value it actually should be. So if the logical_position is less than 20 for the file menu in wireshark, it is set to 20, but if it is higher than that, the y value is set to the y value of the logical_position.
Here's some sample output from testing with wireshark (see the attached screenshot).
[3142540.511] wl_output@16.geometry(0, 0, 480, 270, 2, "Samsung Electric Company", "S22C300", 0) [3142540.544] wl_output@16.mode(1, 1920, 1080, 60000) [3142540.563] wl_output@16.scale(1) [3142540.570] wl_output@16.done() [3142540.585] zxdg_output_v1@17.name("HDMI-A-1") [3142540.593] zxdg_output_v1@17.description("Samsung Electric Company S22C300 0x00007F35 (HDMI-A-1)") [3142540.601] zxdg_output_v1@17.logical_position(0, 100) [3142540.612] zxdg_output_v1@17.logical_size(1920, 1080) [3142540.623] wl_output@16.done()
and
[3146385.715] -> wl_compositor@5.create_surface(new id wl_surface@46) [3146387.652] -> xdg_wm_base@24.get_xdg_surface(new id xdg_surface@36, wl_surface@46) [3146387.702] -> xdg_wm_base@24.create_positioner(new id xdg_positioner@35) [3146387.732] -> xdg_positioner@35.set_anchor_rect(6, 100, 1, 1) [3146387.788] -> xdg_positioner@35.set_anchor(5) [3146387.810] -> xdg_positioner@35.set_gravity(8) [3146387.832] -> xdg_positioner@35.set_size(341, 378) [3146387.867] -> xdg_surface@36.get_popup(new id xdg_popup@39, xdg_surface@26, xdg_positioner@35) [3146387.918] -> xdg_positioner@35.destroy() [3146387.938] -> xdg_popup@39.grab(wl_seat@12, 6060)
See Also https://github.com/swaywm/sway/issues/5212#issuecomment-649367587
Attachments
Issue Links
- is duplicated by
-
QTBUG-96983 Popups missing or placed incorrectly when using Wayland
- Closed
- relates to
-
QTBUG-94778 Using right click on a Desktop icon will show the context menu on the other monitor
- Closed
-
QTBUG-49663 menu position wrong on second monitor
- Closed
-
QTBUG-88561 QMenu misplaced on Wayland in some multihead arrangements
- Closed
- resulted in
-
QTBUG-99618 Expose XdgPositioner to QtBase
- Reported
-
QTBUG-115576 Wayland: QComboBox popups might go partly off screen
- Reported
For Gerrit Dashboard: QTBUG-85297 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
388840,1 | WIP: adding QPlatformTheme::AdjustPositionToDesktop and etc | dev | qt/qtbase | Status: DEFERRED | -2 | 0 |
413952,2 | Widgets: Avoid trying to keep menus on screen on wayland | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |
414911,6 | Keep toplevel windows in the top left corner of the screen | dev | qt/qtwayland | Status: MERGED | +2 | 0 |
418300,2 | Keep toplevel windows in the top left corner of the screen | 6.4 | qt/qtwayland | Status: MERGED | +2 | 0 |
418303,1 | Keep toplevel windows in the top left corner of the screen | 6.3 | qt/qtwayland | Status: ABANDONED | 0 | 0 |