microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
9.9k stars 296 forks source link

If you iconize (minimize) a dialog window, it is gone forever #1241

Open dpeterc opened 1 month ago

dpeterc commented 1 month ago

Windows Version

Microsoft Windows [Version 10.0.22635.3570]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-2

Distro Version

OpenSuse 15.4

Other Software

nedit

Repro Steps

Open nedit and then open a dialog window, like File > Open... or Search > Find... If you then press a button to iconize (minimize) the dialog, two things can happen: if dialog window is exclusive, then program becomes unresponsive, since it expects closure of dialog, but the dialog is gone... If dialog window is non-exclusive, then the dialog is gone and there is no way to get it back. image Dialogs do not have their own icon in taskbar, so they can not be recalled. On some X11 window managers, that can be solved by iconizing and resorting the main window, it brings back all the popup windows. But on Wsgl2, it does nothing, dialog windows do not come back. Even calling the same function from the menu does not help. This makes some GUI programs quite crippled, as an inexperienced user can quickly come into state where whole program is unresponsive, or some functions are no longer available.

Expected Behavior

Dialog windows should have its own icon in the taskbar, so they could be restored if iconized, or at lease all dialog windows should be restored from the iconized state, if top level window is iconized and restored.

Actual Behavior

Progam becomes unresponsive and dialog window can no longer be recalled.

Diagnostic Logs

No response

### Tasks
github-actions[bot] commented 1 month ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
sbradnick commented 1 month ago

I think this is a weird Wayland (/ WSLg interoperability) oddity and the ability to minimize/maximize an open file dialog shouldn't be an option.

It doesn't show up when using Xming for a display server, probably cause apps like nedit and gedit are more geared towards X11 than Wayland.

I was able to get (xprop along with a combo of) xdo + xdotool to hide/show 'Open File' again once I was in the state you described with NEdit on Leap.

dpeterc commented 1 month ago

I attach the logs as per bot's request. WslLogs-2024-05-07_23-45-33.zip

dpeterc commented 1 month ago

I think this is a weird Wayland (/ WSLg interoperability) oddity and the ability to minimize/maximize an open file dialog shouldn't be an option.

It doesn't show up when using Xming for a display server, probably cause apps like nedit and gedit are more geared towards X11 than Wayland.

I was able to get (xprop along with a combo of) xdo + xdotool to hide/show 'Open File' again once I was in the state you described with NEdit on Leap.

I agree with you that this is probably caused by Wayland based window manager, which does not follow the normal X11 ICCCM standards. But the fact is that there is very little actual Wayland-only software; vast majority is X11 based. Wayland includes XWayland in order to run X11 based programs. If I run nedit on Wayland Kwin session in native OpenSUSE 15.4 (not on WSLg) I do not have this issue. Dialogs are iconized and restored as expected. So it is a bug in WSLg component, probably in its Weston compositor.

The bug is no specific to nedit, all Motif based programs behave like this. Even mtpaint (https://mtpaint.sourceforge.net/) which is Gtk based exhibits the same problem.