On 18.12.2012 23:48, Ian MacArthur wrote:
>
> On 18 Dec 2012, at 18:18, Chris Shearer-Cooper wrote:
>
>> We are using fltk 1.3.0rc2; I'm displaying a modal dialog by calling
>> set_override() and set_modal(), ...
...
> So, try just the set_modal() and see how that goes.
>
>
>> Any suggestions how I can force fltk to display the second modal dialog
>> on top of the first?
>
>
> You don't say what platform you are on, but on X11 or WIN32 that ought to 
> pretty much just work - though it might be a good idea to call show() on your 
> prior modal window, just before you set the new one modal and show it, as in 
> some cases I have found (probably superstition) that doing so helps ensure 
> the transient property gets the right parent and so forth...

I believe that this is a good way to force the correct window hierarchy
in terms of transient property and so on. Once I was trying to fix a
problem [1] with modal and menu windows (and it worked partially in my
tests) by setting additional window attributes (e.g. menu_window())
so that we could find the correct (or: at least a better fitting)
parent window in the window list, but this was never completed... :-(

Anyway, calling show() on the first modal window before calling
show() for the new window will put the first modal window on top of
FLTK's internal window list and make it more likely to be selected
as the parent window of the new one.

> On OSX, I have found that having multiple modal windows can be a bit fragile, 
> OSX does not really have the concept of modal windows, and the way we enforce 
> it used to be a bit flaky at times; though that said it seems a lot better 
> these days, so your ought to be fine!

I can't comment on OSX.

Albrecht

[1] If you tried to open a modal window while a menu was open, then
the menu window would become the (a) Windows: "parent window" or
(b) Linux/Unix/X11: get the "transient attribute/relationship" of
the modal window. Then, when you closed the menu window, the modal
window would be closed too. This is probably still the case, and
IIRC there's a STR for this, but I don't know which one right now.

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to