-
Notifications
You must be signed in to change notification settings - Fork 135
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
Fixed main popup positions under Wayland #2086
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… for bottom and right panels. The problem was that some Wayland compositors returned global coordinates when anchors were applied, while some others (perhaps KWin) didn't. So, the patch uses local coordinates and changes them to the global ones in the end.
92ad6f0
to
8fe8d44
Compare
Oh, my bad! I forgot to apply a change that I'd made here. Nice catch! It's fixed now. Please try again. |
Looks fine now, nice work, it was worrying me quite a lot. Do we ship a point release? |
No need to test under x11, I forgot to ask. |
Did you test it thoroughly under X11 too? I tested it only with top and bottom panels and also with auto-hiding under X11.
I don't think so. We didn't promise a really usable Wayland support for the panel in 2.0.0, and we don't have many Wayland users of 2.0.0 (maybe no one). |
Why?! |
Hi i installed it and restarted panel module. It was installed using:
The popup position seems to be fixed, but the menu bar items are absent(all the opened windows). --> tested in wayland(labwc). This happened to me too with one of the last panels i compiled, not sure why. Reverting the panel to:
seems to show my window icons again, after restarting panel module. |
You would need to apply the changes to @marcusbritanicus ' branch, maybe he'll include them soon. |
This branch doesn't contain the Wayland PRs. It's based on the master. None of the Wayland PRs is merged (because none of them is ready yet), and the master branch doesn't support task-bar on Wayland. As I suggested in #2084 (comment), you could apply the patch to the source you used before. If that's not easy for you, you could wait until it's merged; then you could apply the patch at #2043 (comment) to the master. EDIT: You can always extract the patch of any PR by adding |
Awesome! i just have managed to do it 😄 ( I can verify that applying that patch to this: https://github.com/LXQt-Marcus-Fork/lxqt-panel/tree/wlroots_backend_patched Thanks a lot for the patience, i am still learning xD |
Yes, that's an effective way to do it. Thanks for testing the PR. It'll be merged after being approved. |
Tested on wlroots_backend_patched, and another local branch... Works like a charm. @tsujan Nice catch!! |
I applied the patch to Marcus' panel and see an inconistent behavior with right panel (probably the same with bottom panel):
but all items inside statusnotifier have their right clicks popups at screen border. |
I intentionally used "main popup" in the title. I know about quick-launch and tray right click menus under Wayland, but they're not related to this PR. |
I know, thought just to mention it. |
And please don't forget X11. Although I think a regression should be impossible, it needs thorough tests. |
Couldn't spot regressions on x11. But mainmenu is still aligned to bottom screen, but as it has bad issues anyway (search results) on wayland bottom panels we can ignore this IMO. |
Thanks for checking.
Its problem is like that of the other two cases. I'll investigate them later,. Let's keep this PR limited to |
I did a preliminary check and found out that those cases are all related to how |
For future reference: It's getting more interesting! Actually, I tested it in both main-menu and status notifier by using So, the problem can be in QtWayland or layer-shell-qt or on a more basic level, but it isn't in our code. |
If I understand correctly (I can be way off the mark on this one), on wayland, we have something called the xdg-positioner. It's duty is to position the popup. The values you give it are calculated relative to the parent. There are also options to set the anchor, gravity, size and so on. It is quite possible that Qt is doing something wrong here. Or perhaps, Qt is moving the popup that's going "out of the screen", or something like that. |
I agree. Since it doesn't happen when we show a popup explicitly, it may be in |
I got bored and did another test, by using The fact that tooltips are also affected points to a deeper cause inside Qt. |
… for bottom and right panels.
The problem was that some Wayland compositors returned global coordinates when anchors were applied, while some others (perhaps KWin) didn't. So, the patch uses local coordinates and changes them to the global ones in the end.