Hello again,
For anyone interested, I solved it by not using modal windows at all.
Instead I set a flag in the main window when showing the "act as modal"
windows, skipping event handling in the main window.
Looks like I have the exact behaviour I want now, and I haven't found
any unwanted side effects so far.
/D
matthiasm skrev:
>
> On Jul 8, 2007, at 10:17 PM, Daniel Polski wrote:
>
>> In your code you dismiss the popup window as soon as the user interacts
>> outside the popups area, and release the grab. That is not the behaviour
>> I'm looking for.
>>
>> I am trying to let the user interact both with the green and yellow
>> window (in my example application) at the same time. And more, at the
>> same time I want the green window act like a modal window to the rest of
>> the application (the grey window).
>>
>> I don't understand how I can use grab to let the user interact with both
>> windows. Got time to explain a little more in detail how I could solve
>> it? I am unable to figure it out when reading the code you posted, but
>> maybe it's in there and I'm just not "getting it"..
>
> Oh, I thin I understand. You can only have a single modal window. You
> are trying to have two windows that are modal to the application at the
> same tim.
>
> Modal windows are actually just a shortcut for not disabling all other
> windows. So what you can do is get the list of all windows that are open
> in your application and call "disable()" on them, except your two modal
> windows of course. You can get a list of windows n your app using
> for (win = Fl::first_window(); win; win = Fl::next_window(win)) {
> ...
> }
>
> There is one drawback though: all widgets in the other windows will be
> grayed out. If you don't want that, you can write a new "Window" class
> that can set a flag to ignore all mouse messages.
>
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk