Prevent in-game window from being displayed on top of the game when game is launched and app is running on desktop

When my app is open on the desktop and the game is launched, the window briefly grabs the focus (it’s an in-game window) before I get the event that the game is running (which lets me hide the window to display a loading screen). See the attached gif

window flicker

I would need a way to avoid that - either by preventing the app from being display on top of the game before I can react to it, or having an event I can react to when the window is about to be redisplayed in the game.

Impact: low. It’s a bit annoying, but it’s not preventing users from using the app.

@sebastientromp hi.
I can’t see the GIF as it’s very small…
Is your window should be a desktop window or an in-game window?

It’s an in-game window (that can also be displayed on desktop).

Can you download the gif from there? Dropbox - window flicker.gif - Simplify your life

@sebastientromp as your window is not defined as “in-game” or “desktop”, the default behavior is that it’s displayed on desktop, and when it recognizes that the game is launched, it’s converted to “in-game”. It’s expected behavior that can not be changed.
The right solution is to use separate windows - one for desktop and one for in-game.

Currently, I rejected the FR. Feel free to re-open it to discuss that.

Got it, thanks for the update :slight_smile:

1 Like