On 09.06.2011 21:39, Andrew Waldrum wrote:

> I am using 1.3rc3 on the latest Ubuntu and am having a problem with
> non-modal windows going behind normal windows in the same application.
>
> My intent is to have a button bar always in front of an openGL canvas so
> I made the buttons a separate non-modal window.  As I understand it this
> means it should always be above the normal window but allow the normal
> window to continue accepting events.  This seemed to work but now
> whenever I click the normal window it pops in front of the button bar no
> matter what the modal setting.

[...]

> The only difference I can see in how I am using fltk from most examples
> I have seen is that I am currently instantiating all windows  at startup
> and either hiding or showing them depending on the state.  When doing it
> this way the showing order is important, calling show() on windows from
> back to front(which I am doing).
>
> Any ideas?

 From your description it seems that what you're doing is correct, but
maybe (I'm not sure about it) there can be a timing problem. AFAIK the
different windows' relationships are established when show()n for the
first time. However, simply calling show() and then hide() again before
the FLTK event queue gets a chance to run() may not be enough, since
this doesn't instantiate the system Window object, and this *might*
be the cause of your problem.

A minimal example code how  exactly you create, show, and hide the
windows, together with the main program code (when do you call
Fl::run()?) might help. If you post some code, please post a minimal
compileable example so that we can test it to help you.

BTW.: can you test your program on other platforms, e.g. Windows? What
happens when run on Windows or Mac OS X?

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

Reply via email to