Strange alt-tabbing mysteries in a sub-process

Started by jakethesnake, July 06, 2023, 14:21:38

Previous topic - Next topic

jakethesnake

Hello,

I've started staring my game in a subprocess so that I can get more control of the JVM at startup, but I've run into some weirdness regarding window focus and alt-tabbing behaviour.

This happens in borderless full screen windows and regular full screen windows. If the game is started in the "parent" process, everything works fine. The application I tab to gets displayed on top of the game window, and the game is unfocused. This is with GLFW_AUTO_ICONIFY = false

However, when using the same settings and starting the game with a java process builder, the window only looses focus, but does not allow another window on top. Alt tabbing becomes impossible. Perhaps this the behaviour would be the same as of setting GLFW_FLOATING = true, but I am setting it to false.

Of the handful of window hints, it seems that setting GLFW_AUTO_ICONIFY = true allows tabbing. However, it also does what it says it would, and minimizes the game window. This is not optimal.

I suppose this can be replicated and investigated by simply running the LWJGL demo as it is, and then bake it into another process that you spawn from your main process.

jakethesnake

Idiot warning. When I was producing a minimal example, I realized that I was accidently creating a full screen window instead of a borderless one, so false alarm! However a full screen window has problems tabbing, which can only be fixed by setting it to iconify. I don't know if this is a bug or not.