Add AlwaysOnTop option for message dialogs on windows
Zenity dialog without AlwaysOnTop(true)
Zenity dialog with AlwaysOnTop(true)
I'm… not sure I want to add this.
This feature has no parallel in other OSes, and is generally somewhat frowned upon.
Have you tried Attach to ensure your dialog lives on top of another window?
I know I do have a few features that aren't cross platform, but usually their effect is subtle.
That being the case, it should be active by default because in GNOME and macOS it shows even in full-screen mode.
Although it may be frowned upon, I was asked to do this for an app that runs in the background. The people who use it have many applications open, so they never saw the messages or saw them very late.
How would you do it with Attach?
No it most definitely should not be default.
MB_SYSTEMMODAL doesn't just bring a dialog forward, it keeps it on top of everything else, no matter what, preventing interaction with whatever is below. That's why it's frowned upon. I can add it, but it will be bad UX for your app. And it does not match behaviour of Linux or macOS.
Could you try MB_SETFOREGROUND instead? That might be a default, but I'd need to test more.
You are right.
MB_SYSTEMMODAL acts like a fatal error that blocks all other actions until it is addressed. I wasn't aware of this (Windows is not my OS).
On the other hand,
MB_SETFOREGROUND also indicates an error, but it seems to be less severe. It brings the window to the foreground but still allows interaction with other applications.
Latest version always includes MB_SETFOREGROUND.
Hopefully that's good enough, otherwise I'll reconsider.
Hope you don't mind.