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(), then while that modal dialog is being 
> shown I want to show a second modal dialog as a child of the first.  The 
> problem is that no matter what I do, the second dialog always shows up 
> _under_ the first.


I see Matt's already replied, and I have to say, I agree with his analysis, re 
not calling set_override().
It should not be necessary, simply calling set_modal should have the desired 
effect.

The only place we actually use set_override() (AFAIK anyway) is for tooltip 
windows, where forcing them always on top makes sense. Setting it on your first 
modal window is almost certainly preventing any subsequent window being made 
topmost...

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...

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!



_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to