Subject: x2client (mswin32) remote focus change should bring window to front

From: "Abt, Johannes" <[email-masked]>
Date: Mon, 28 Dec 2020 10:41:29 +0000

Package: x2goclient
Version: 4.1.2.2

When a remote program changes the focus, the x2go client window fails to bring  the focused window to the front. As a consequence, when I start typing, the text appears in a background window. As a consequence, usually, you do not see the text that you type.

Steps to reproduce:
* use x2goclient (mswin32) to start a custom ("/usr/bin/konsole") remote session on RHEL7.4 (x2goserver-4.1.0.3-0.el7.x86_64, same version for x2goagent).
* inside "konsole", start "code" (Visual Studio Code) => Visual Studio Code window opens in front and gets focus; konsole looses focus (cursor transforms from solid rectangle to empty/hollow rectangle; subsequent keystrokes go to "code" window
* move windows make "code" and "konsole" overlap a little bit so you can see with window is in front
* click into "konsole window" => "code" looses focus; "konsole" moves to front; "konsole" gets focus and receives subsequent keystrokes
* enter "code foobar" and press the enter key
* enter some text in order to see which window has got the focus

Expected behaviour for last step:
Either (preferred):
* "code" moves to front and gets the focus; konsole loses the focus
or:
* "konsole" keeps the focus and stays in front

Consistency is key.

Observed behaviour:
* "konsole" loses the focus and stays in front
* "code" gets the focus but stays in the background