Bug 500520 - Not following the xdg-shell protocol correctly
Summary: Not following the xdg-shell protocol correctly
Status: REPORTED
Alias: None
Product: layer-shell-qt
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-21 12:31 UTC by Alan Griffiths
Modified: 2025-02-21 13:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Griffiths 2025-02-21 12:31:25 UTC
SUMMARY

Menus in lxqt-panel are positioned using an anchor rectangle that is not within the parent geometry. This is not permitted by the protocol:

```
	When the xdg_positioner object is used to position a child surface, the
	anchor rectangle may not extend outside the window geometry of the
	positioned child's parent surface.
```


STEPS TO REPRODUCE
1. Run the lxqt-panel with `WAYLAND_DEBUG=client` 
2. Pull up a menu

OBSERVED RESULT

```
[1782416.373] {Default Queue}  -> wl_compositor#4.create_surface(new id wl_surface#43)
[1782417.605] {Default Queue}  -> wp_fractional_scale_manager_v1#16.get_fractional_scale(new id wp_fractional_scale_v1#47, wl_surface#43)
[1782417.717] {Default Queue}  -> xdg_wm_base#3.get_xdg_surface(new id xdg_surface#42, wl_surface#43)
[1782417.764] {Default Queue}  -> xdg_wm_base#3.create_positioner(new id xdg_positioner#44)
[1782417.852] {Default Queue}  -> xdg_positioner#44.set_anchor_rect(0, -550, 1, 1)
```

This is wrong: `set_anchor_rect(0, -550, 1, 1)`

EXPECTED RESULT

I'd expect the anchor rect to be the position of a widget in the parent window. A position outside the window geometry with a size of 1x1 looks bogus. Other parts of Qt seem to have this the way I expect (e.g. the qterminal menus)

SOFTWARE/OS VERSIONS
Fedora Linux: 42 (LXQt Prerelease)
Qt Version:  6

ADDITIONAL INFORMATION

Previous discussion at https://github.com/lxqt/lxqt-wayland-session/pull/40#issuecomment-2666380287

Testing with ISO from https://koji.fedoraproject.org/koji/buildinfo?buildID=2660492
Comment 1 Neal Gompa 2025-02-21 12:34:03 UTC
This was with layer-shell-qt 6.3.0 based on the reference in the ISO package manifest.
Comment 2 Neal Gompa 2025-02-21 13:46:06 UTC
So far, this has only been observed with panels positioned the bottom of the screen.