Skip to content
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

Editor ignores 'run/window_placement/screen' setting when 'prefer_wayland' is enabled #88151

Open
Tracked by #88346
mattsullentrup opened this issue Feb 9, 2024 · 8 comments

Comments

@mattsullentrup
Copy link

Tested versions

Reproducible in 4.3 dev 3

System information

Godot v4.3.dev3 - Arch Linux #1 SMP PREEMPT_DYNAMIC Mon, 05 Feb 2024 22:07:49 +0000 - Wayland - GLES3 (Compatibility) - AMD Radeon RX 6600 (radeonsi, navi23, LLVM 16.0.6, DRM 3.57, 6.7.4-arch1-1) () - AMD Ryzen 7 5700G with Radeon Graphics (16 Threads)

Issue description

Godot always runs the project on screen 1 instead of screen 2 regardless of window placement setting. If the editor is on screen 2, the project still always launches on screen 1.

Steps to reproduce

  • Create new project
  • Create empty node as scene root
  • Change window placement setting to 'next screen' or 'screen 2'
  • Run project

Minimal reproduction project (MRP)

N/A

@Riteo
Copy link
Contributor

Riteo commented Feb 10, 2024

Wayland has no API for asking to be put on a screen AFAIK.

At most, we could change the output onto which we fullscreen, through xdg_toplevel::set_fullscreen, but that's it unfortunately.

@mattsullentrup
Copy link
Author

mattsullentrup commented Apr 30, 2024

I just figured out a workaround for this. Change the window_placement/rect setting to 'custom position' then match the x value to the size of your main monitor e.g. 1920 for a 1080p monitor. Use -1920 if you want the window to show up on the next screen to the left. It only works if the project settings display driver is set to default or x11 unfortunately.

@Riteo
Copy link
Contributor

Riteo commented May 3, 2024

@mattsullentrup to be clear, as far as I'm aware, this behavior is not present in any (commonly-implemented) protocol specification and thus is non-compliant and compositor-specific.

In other words, It might work on e.g. mutter but not kwin and so on.

@mattsullentrup
Copy link
Author

Gotcha well that method at least works for me with kwin. I just like being able to tweak stuff in the editor with the game up on my other screen.

@Riteo
Copy link
Contributor

Riteo commented May 3, 2024

It only works if the project settings display driver is set to default or x11 unfortunately.

Oh wait I just noticed this sentence. You're using XWayland then, so it's not actually using Wayland. That makes a lot more sense now.

In other words, yeah, it should still work fine with XWayland AFAIK.

@mattsullentrup
Copy link
Author

Right the game launches with Xwayland but the editor itself keeps using Wayland.

@Riteo
Copy link
Contributor

Riteo commented May 4, 2024

@mattsullentrup exactly, that's why we put two settings actually. The Wayland backend is definitely enough for the editor (sans multiple windows for now) but not necessarily for games, so people might want to switch them indipendently.

@4X3L82
Copy link

4X3L82 commented Jul 18, 2024

I found this ticket because I was experiencing the same issue: Wayland ignoring the Same as Editor screen selection.

However, I found an option that does work for me: Primary screen.
Maybe this can help you/someone. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants