On a Windows machine I run the MobaXterm X server system. I use this to display Emacs running on a remote Linux machine. This works fine.
I also use this X system to display Emacs running on a WSL Linux on the same Windows machine. This does not work great: Each time the Windows machine goes into hibernation the WSL Emacs crashes and I get the following message:
Connection lost to X server '10.1.2.3:0.0'
When compiled with GTK, Emacs cannot recover from X disconnects.
The remote Linux Emacs continues running as if nothing has happened. Both Emacses are compiled with GTK+.
Firstly I do not understand why the crash only happens for the WSL Emacs. After all it is the same X server as for the remote Emacs, so the disconnect should happen for both Emacses, shouldn't it?
Secondly, how can I solve this issue with WSL? Do other X servers for Windows work better? Is there a X-capable Emacs not using GTK which recovers better from temporary disconnects on hibernation.
Note: Due to the fact that on the Windows machine I work mainly in the WSL environment (and have set up all the CLI tools tools like grep and hunspell, it is much easier to have Emacs running there too for corresponding Emacs commands like find-grep-dired or ispell.