-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Window X/Y offsets (specified through --geometry) ignored on Wayland #8692
Comments
Unfortunately this is just a wayland limitation. Wayland clients have no way to position themselves on an output, so there's nothing we can do. The only possible way to fix this would be to convince wayland developers to extend xdg-shell and/or add a new protocol we could use. Good luck with that though. It's possible that your compositor may offer a way to position windows. I don't recall if sway has something like that. |
One thing I may have forgotten to mention, which seems obvious though, is that I am using the following mpv-related commands in my sway config:
@Dudemanguy Right. After browsing through some more issues that happen to be connected with sway, I realize this may be a common theme for Wayland. For instance, in #6080 or #8606. I just checked the
I have tested the second one using Even though I am no Wayland (and by no means xdg-shell) expert, I dug a bit in xdg-shell docs and found the |
All the coordinates we get client-side in wayland are surface-local meaning that they have no information about the global layout/coordinates of the entire output space. |
Hi guys, Do you have any news about this problem ? You said that is a limitation of wayland, but with wayland becoming the default choice in new Ubuntu releases do they change something about that ? |
The situation remains unchanged. There is currently no way for a wayland client to request where on the desktop it should be placed. This functionality would either need to be added to xdg-shell or in a new wayland-protocol. |
I can confirm that issue is still present with mpv 0.34.0 and sway 1.6.1. Anybody care to raise this upstream? Also what would be the appropriate upstream place to have this discussion? |
The right place to ask would be in wayland-protocols. Glancing around, I do not see an open issue related to this at the moment. |
@Dudemanguy Agreed. I have just created a feature proposal there. We shall see what the response is like. Feel free to voice your support in the referenced discussion. 😉 |
After the prior Wayland issue was derailed and went nowhere a new MR has been opened, hopefully this time we'll see a positive result |
I wouldn't hold my breath. |
Not sure how this would work on other DEs, but as a workaround, I was able to set the mpv window position through KWin's application rules in Plasma. |
Conky can set its position on wayland environments somehow. |
Layer shell surfaces can anchor themselves to an edge of the screen and specify the margin, but clients can't place themselves in arbitrary positions. |
They can if you force xwayland. Just use this command: export WAYLAND_DISPLAY=
export XDG_SESSION_TYPE=x11
mpv This works great for our app store's dual-pane window placement on wayland, but I admit it is less ideal for a video player. |
it is less ideal for anything at all to be running under xwayland. Thanks for letting me know i should never use pi-apps |
Important Information
mpv version:
Linux Distribution and Version: archlinux (updated ~week ago), output of
uname -a
followsSource of the mpv binary: official distribution package
If known which version of mpv introduced the problem: unknown, issue discovered when transitioning from X11 to Wayland
Window Manager and version: sway 1.5.1, installed from official distribution package
GPU driver and version: nothing fancy, using Intel graphics, so i915 + MESA, details follow
Possible screenshot or video of visual glitches: no glitches per se, but I still took a screenshot
Reproduction steps
Run the following command:
Expected behavior
The window of mpv should be placed at x=50, y=40.
Actual behavior
The window of mpv is aligned to the center of the display.
Log file
Attached as mpv-bug.log
NOTE: even though the log was produced with a multi-display setup, I verified earlier that the number of displays does not affect the issue in any way.
Sample files
N/A
The text was updated successfully, but these errors were encountered: