B_MODAL_SUBSET_WINDOW_FEEL and clicking on the parent window

My modal dialog has B_MODAL_SUBSET_WINDOW_FEEL set and it’s parent window is added to the dialog via AddToSubset. This keeps the dialog above the parent window like I want, however if the application is in the background and the user can’t see the dialog, but can see the parent window. They can’t click the parent window to bring the whole app to the front. The click just does nothing.

Ideally clicking the parent window would bring both the modal dialog AND the parent window(s) to the front so the user can finish interacting with the dialog in question.

To be honest I have exactly the same issue under Windows 10, with the window ports of my software. But nevertheless I’d like to see if I can try and make it work how I want. My parent window does NOT get any MouseDown events to hook and do anything useful.

How would I go about making the window stack move to the front if the user clicks the parent window?

I would be surprised if you could get this to work in any UI system, as the point of a modal dialog is to restrict actions to that dialog. Hence the name, when you open the modal dialog, you are then in that “dialog mode,” and not in “parent window mode” anymore. Only by leaving “dialog mode” do you return to the parent mode. It’s meant to keep a user from doing things that would be bad for that mode, such as closing the app while it’s writing a big file.

I’m not allowing the user to interact with the parent window, I just want the window stack to come to the front. In the case that you can’t see the dialog “on top” but just part of the parent window. This is quite a common case and I keep getting caught out by this.

This should just be a default thing the OS does for a good user experience.


Sounds like a good idea, can you open an enhancement ticket about it on dev.haiku-os.org?