godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Improve Modal Window (Project settings etc.) behaviour on Windows. #8468

Open mrbbbaixue opened 11 months ago

mrbbbaixue commented 11 months ago

Describe the project you are working on

Teaching gamedev with godot.

Describe the problem or limitation you are having in your project

Basically, when you open any project, open Project Settings window and minimize it. It just minimize to the corner of screen like this: image

This is because the Project Settings window is regarded as a modal window on Windows. Normally, the modal window cannot be minimized, (or can be minimized, but the main window need to be minimized as well). But godot didn't handle this situation. So Windows use this behaviour as shown in screenshot.

This cause various problems:

In some rare situation, If you have multi-monitor setup, the modal window will always minimize to the very left-bottom corner of your screens. If you have many windows stacking together now, this tiny window is very hard to find: image

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I don't know about how the modal windows behaviour is defined in Windows modern design guidelines. But this is two common solutions for this:

  1. Just simply remove the minimize button on any modal windows.
  2. Keep the minimize button, but also minimize any window that might become inresponsive.

Plus, there should be some notifications if users are trying to click the main window when any modal window is being opened:

An example of this would be to open the device manager, then open one of your devices. Then click on Driver details and try to manipulate the properties window while the driver details window is open. You’ll get the sound effect and window flash that I believe you’re expecting from Godot in the case of a modal window.

image

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

This is a engine-side issue, since I'm not familiar to Godot Engine's source code, idk how to solve this.

If this enhancement will not be used often, can it be worked around with a few lines of script?

This can be workaround by disabling multiple windows in editor settings, but is inconvient.

Is there a reason why this should be core and not an add-on in the asset library?

This is a engine-side issue.

Dynesshely commented 11 months ago

I can't approve anymore.

mrbbbaixue commented 11 months ago

Also, I actually don't know how to classify this kind of problem? In some situations, this will cause a "soft lock" and looks like a bug.

allenwp commented 11 months ago

If anyone has experience creating modal dialogs in Windows apps, I’m curious what solutions are common with modern apps. At a glance, removing the minimize button on modal windows sounds like it would be a substantial usability improvement, but I suspect there might also be a different window mode in the Windows APIs that could be used for modal windows that would “automatically” address these usability issues?