-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
xdg-popups appear at incorrect position #3135
Comments
With my setup this only happens for xwayland windows, right-click works fine for native wayland applications |
@philipflohr which sway version? i think it worked for me in an older version. |
Can you send a |
it also happens in wayland apps (e.g. firefox) |
Well, pavucontrol is Wayland-native. |
its related to the position settings in sway config. |
Can you run |
I haven't been able to figure out why yet, but for some GTK applications, if the absolute y location of the output is a higher value than the surface local y location of the last wl_pointer motion event before the popup is created, the xdg-positioner's set_anchor_rect's y value is the y location of the output. Also, the issue occurs in rootston as well so this is not sway specific. Example snippets from
|
More information:
|
This is caused by applications using the function Please submit patches or report to effected applications to have them update to use one of the newer functions. https://bugzilla.gnome.org/show_bug.cgi?id=772096#c10 |
I'm seeing the same behavior as with FF and pavucontrol with menus in Calibre, a pyqt5 application. Since this is happening for both GTK and QT apps doesn't this indicate a bug in wlroots? I played around with positioning a bit and the results match @RedSoxFan's description of the way the coordinates are transformed. |
I have not looked into the issue with QT since I was not aware of any QT application that showed the behavior. However, the GTK issue is definitely due to the deprecated function in my previous comment. My guess is QT may have a similar function or it is an issue with Calibre itself. I can take a look into it in a few hours |
Same issue with popups in Krita, another pyqt app, which runs xwayland because of tablet stuff (checked via So with QT at least, the problem is present in both modes. |
|
For QT apps see: https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes Summary in case the link breaks in the future: QMenu needs to either have a parent or use mapToGlobal with an event position in order for the menu's to be positioned correctly in Wayland. QCursor::pos should not be used under Wayland. Similar to the message for GTK apps above, please submit patches or report to effected applications to have them update their logic for Wayland. |
I went ahead and reported to mozilla: |
#1142 seems to still exist?!
steps to reproduce:
open an app, e.g. pavucontrol or terminator and get a right click menu. see screenshot.
➜ ~ swaymsg -t get_version
sway version 1.0-beta.1-195-gc36665bc (Nov 15 2018, branch 'master')
➜ ~ pacman -Q wlroots
wlroots-git 0.1.r79.g040d62de-1
sway-wrong-menu.log
The text was updated successfully, but these errors were encountered: