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

Improve screen switching for Window #1925

Open
pushfoo opened this issue Oct 15, 2023 · 4 comments
Open

Improve screen switching for Window #1925

pushfoo opened this issue Oct 15, 2023 · 4 comments
Milestone

Comments

@pushfoo
Copy link
Member

pushfoo commented Oct 15, 2023

Enhancement request:

tl;dr: make moving the Window more intuitive

What should be added/changed?

  • A better way to move the window between screens
  • Add an optional screen argument to Window.center_window for convenience

What would it help with?

Moving windows between is currently counter-intuitive. It only seems to be possible through Window.set_fullscreen as result of pyglet API Design, which is how arcade.Window.__init__ selects the current screen. Although the base pyglet Window has a screen property, it is read-only.

@DragonMoffon
Copy link
Contributor

The window's position is relative to the primary screen, no matter which screen the window is visible on. If that is the case, you could use that to provide a method of moving the window to a specific screen.

@einarf einarf added this to the Future milestone Jan 16, 2024
@einarf
Copy link
Member

einarf commented Feb 18, 2024

Should this issue be in the pyglet project? Don't really want to have lingering open here that will stay for years unless it's realistic that someone is going to work on this.

@pushfoo
Copy link
Member Author

pushfoo commented Feb 18, 2024

Should this issue be in the pyglet project?

TL;DR: pylget doesn't seem to want it + this feature needs a warning it'll break under Wayland if we add it.

Based on what I saw in the pyglet Discord's help channels, my impression was they didn't want to add it. One major issue is that on Wayland, this is actually impossible by design in the original version of the protocol.

TL;DR:

  1. Window manipulation is used as a crude JS fingerprinting technique to detect screen size
  2. The original Wayland protocol design forbids clients from placing their windows to counter this
  3. There seem to be working backward compatibility features through XWayland and a proposal for a protocol extension, but no guarantees it'll merge soon

Imo, this means the feature belongs in arcade if anywhere. If not, we might be able to add some notes to the programming guide + links to info on Wayland and pyglet's doc.

Fun sidenote: I know we technically don't support any BSD, but it should theoretically be possible to get Wayland on it according to the FreeBSD doc.

@einarf
Copy link
Member

einarf commented Feb 21, 2024

I don't see this ever getting worked on to be honest. It needs to work cross platform and across different display managers. If it doesn't trickle down from pyglet it probably will never happen.

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

No branches or pull requests

3 participants