arcade
arcade copied to clipboard
Improve screen switching for Window
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_windowfor 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.
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.
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.
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:
- Window manipulation is used as a crude JS fingerprinting technique to detect screen size
- The original Wayland protocol design forbids clients from placing their windows to counter this
- 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.
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.
If pyglet doesn't want it there is no way we can realistically make this happen without buying into hacky code we can't possibly maintain.
Agreed. Also, Wayland limitations need to be covered better somewhere in their programming guide.