ArcticaProject / nx-libs

nx-libs
Other
119 stars 39 forks source link

Unexpected fullscreen on reconnect with SDL applications #1053

Open uli42 opened 1 year ago

uli42 commented 1 year ago

Hanno Foest reported via via x2go-user mailing list:

I was running sz81, a ZX81 emulator using SDL, remotely with an IRC client and noticed, that while it worked nicely if started in a session using an x2go Linux client, after disconnecting the session and reconnecting using a Windows client, the application window came up garbled with display artifacts.

What's more, if I disconnect and reconnect the session using a Linux client, it somehow manages to blank my complete local display as soon as the SDL application window gets focus. This confused the hell out of me, and I first suspected a crash, until I figured out what was going on. It's really an SDL issue, I verified by running parallax-4.tar.gz from http://olofson.net/examples.html which displayed the same behaviour.

I would guess x2go has some kind of SDL passthrough mode which is somewhat buggy and doesn't work with windows. Is that correct, or what is the expected behaviour?

I managed to replicate the issue locally on a plain nxagent 3.6.99.26 without using x2go at all like this:

  1. run nxagent -ac :55
  2. in a second shell run DISPLAY=:55 parallax2 -> works fine on the nxagent window
  3. in a third shell run kill -HUP $(pgrep nxagent) -> window will close (resembling session suspend)
  4. wait a while, then repeat the previous command -> window will show again (resembling session resume) -> no fullscreen, no glitches

Repeating the test with nxagent -ac -55 -R in step 1 (thus simulating a rootless session) will shows the problem here, too. So it really looks like a bug in nxagent.