Michael,

I'm not sure I understood your question, and don't have time to think
about it in more detail right now (meant to be in a meeting...) but
there are three different "modal" states a window can have in fltk...

Assuming there are two windows, your base window and a pop-up, the
pop-up can be:

1) Normal state, not modal at all. Either window can get the focus, take
input or appear at the top of the rendering stack.

2) Modal. The pop-up window will always appear at the top of the stack,
and will get the input and focus. The base window will not get the focus
or take the input in this state whilst the pop-up is shown.

3) Non-modal (that's actually a term we borrowed from MS and I think it
is confusing - the X11 term is something like transient-for, which makes
just as little sense...)
The pop-up will always appear at the top of the stack, but either window
can take the focus and take input.

At a guess, it sounds like this last type is possibly what you need?


> I have my base-window and want to show a second window for 
> popup-messages (yes, i know there are some built-in popups in 
> fltk, but 
> i would like to use my own version :-) )
> 
> now, if i set this second window as a child of the 
> base-window and set 
> it also modal then i have the problem that i can't destroy it with my 
> "OK" button (which calls a callback), because i have kind of 
> a deadlock 
> -> because the modal deactivated the mainwindow, but the popup is its 
> child and now the ok-button doesn't work (neither its 
> callback) :-) do 
> you see what I mean?
> 
> sure, i can popup the message in a window which isn't a child of the 
> base-window. but then i have another problem: i have a touch-keyboard 
> (nxkbd -> nano-x) and as soon i delete the popup-window and i switch 
> back to the base-window, i can't use the keyboard anymore 
> (although the 
> base window has still focus (mouse works...) )
> 
> so, the easiest solution would be to have a modal popup which 
> is a child 
> of the base-window, but without the deadlock (i know that 
> there is the 
> set_non_modal()-function, but i can't use this one, because 
> then i can 
> still mess arround on my base-window during the popup, an 
> this i bad :-( 
>       )
> 
> if this doesn't work: does anyone know, why the base-window has the 
> focus and gets the mouse events, but not the keyboard events anymore?
> 
> thanks!
> _______________________________________________
> fltk mailing list
> [email protected]
> http://lists.easysw.com/mailman/listinfo/fltk
> 
> 
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to