Opened 21 months ago
Last modified 19 months ago
#18289 new enhancement
Can't nest modal dialogs using B_MODAL_SUBSET_WINDOW_FEEL and AddToSubset
Reported by: | memecode | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Interface Kit | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
What I’d like is to be able to nest modal windows:
auto A = new BWindow(…) // Main app window A->Show() auto B = new BWindow(…) // First dialog B->SetFeel(B_MODAL_SUBSET_WINDOW_FEEL) B->AddToSubset(A) B->Show() auto C = new BWindow(…) // Second dialog C->SetFeel(B_MODAL_SUBSET_WINDOW_FEEL) C->AddToSubset(B) C->Show()
But in this case, C doesn’t appear when I call Show. If I remove all the SetFeel/AddToSubset calls the dialogs all show up. The api should allow for arbitrarily deep nesting of modal dialogs.
Change History (5)
comment:1 by , 21 months ago
Component: | - General → Kits/Interface Kit |
---|
comment:3 by , 21 months ago
That's EINVAL / B_BAD_VALUE. It appears this is a documented limitation: https://www.haiku-os.org/docs/api/classBWindow.html#ac2abecfda66af23ee5e944530ce69c97
"window is not B_NORMAL_WINDOW_FEEL". So, you can't add windows to the subset of other modal windows.
Not sure why that is. A limitation we inherited from BeOS, I suppose?
comment:4 by , 21 months ago
So maybe this is more of an enhancement than a bug. Nevertheless it's something that app developers want to do and seems reasonable to me.
I wonder if I temporarily change the feel of the parent to B_NORMAL_WINDOW_FEEL and then to B_MODAL_SUBSET_WINDOW_FEEL after AddToSubset... hmmm. Maybe the second SetFeel will fail in a similar fashion.
comment:5 by , 19 months ago
Type: | bug → enhancement |
---|
What's the return value of the last AddToSubset?