ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.98k stars 198 forks source link

Dealing with multiple windows #437

Open Scrumplex opened 2 years ago

Scrumplex commented 2 years ago

When running applications that have multiple windows Gamescope gets confused and rapidly switching between those windows.

For example our Minecraft Launcher Prism Launcher has this issue when the user wants to edit a game instance. The launcher will just create a new window in addition to the main window.

Is there a way to tell gamescope what the main window should be?

AniLeo commented 2 years ago

The same thing happens on RPCS3, the render window launches, and because there's a log frame being updated on the main window, gamescope detects it as activity and rapidly switches back and forth, creating quick visible flickering

awkspace commented 2 years ago

From an end user's perspective, it's sometimes useful to be able to switch the active window, for example returning to the PCSX2 main window without having to stop the emulator. It'd be great to have some rudimentary "alt+tab" functionality for edge cases like these.

akien-mga commented 2 years ago

Adding a +1 for Godot Engine. The editor works fine, but playing the edited project spawns a new window and since gamescope forces both to fullscreen, there's rapid flickering.

I tried a quick workaround by minimizing the editor window, but gamescope rejects it:

xwm: Rejecting WM_CHANGE_STATE to ICONIC for window 0x600003
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN

(I didn't search long to make it work though - I know other projects like Heroic Game Launcher did implement an option to minimize the launcher when starting a game, and it works fine on Deck.)

But indeed as @awkspace puts it, for Godot we would ideally need a way to circle through windows so that users can go back from the running game to the editor and inspect things in the debugger, as well as hit the stop button to go back to editor-only / terminate the game process.

Joshua-Ashton commented 2 years ago

It should only flicker if both windows are getting damaged. Perhaps we should instead consider latest mapped

Haaroon commented 2 years ago

The same issue applies when using the"mod organiser 2 Linux" application. This program launches a console that keeps a log, then find mod organiser 2 in another window. From the mods organiser you can select and launch the game which opens yet another window. Gamescope only focuses on the first log widow and hides all the rest making it impossible to launch the game. This I have to switch to desktop mode to run games that have multi Windows

edit: As of the latest valve steamOS update, they have resolved this issue and allow the user to select the window via the menu

moben commented 1 year ago

Is there some way to switch windows on non-steamOS?

Melechtna commented 3 months ago

I'm having a similar issue, though mines a bit more involved. See the discussion here

https://github.com/murkl/d2launcher/issues/20

themagicalcats commented 2 weeks ago

I've been dealing with this issue with Gamescope for about a week now. I cannot launch Touhou 6 with patches else it just up and hangs and or crashes.

(Oh and yeah, this happens with Sonic Adventure DX whilst running with the modloader.) (And keep in mind this doesn't happen when I don't use gamescope, it's purely a gamescope issue.)

Anyways, it never switches to a new window in my experience. Also fun lore, this used to work.

I did find some workaround however for Wine, and it's to run "gamescope wine explorer /desktop=shell,640x480" and you can either run the things from the start menu or commandline.