On Apr 17, 2007, at 5:19 PM, Christoph Dalitz wrote:

> On Tue, 17 Apr 2007 09:35:20 -0400
> Christoph Dalitz <[EMAIL PROTECTED]> wrote:
>>
>> Oh, sorry, this can not be the case, because
>>
>>      Fl::next_window(Fl::first_window())
>>
>> returns alternating the topmost and the second topmost window.
>>
> After some more testing, I have noticed that the problem is that
> calling Fl_Window->show() moves the newly shown window on top so
> that the next call to
>
>       Fl::next_window(Fl::first_window())
>
> yields the previously shown window, not the next in the cycle.
>
> I have tried to change this, by manually moving manipulating the
> window stack with calls to
>
>       Fl::first_window(somewindow)
>
> but this only works when I call somewindow->show() instead.
> The problem is that this workaround is to flickery to be usable.
>
> Any suggestions are welcome,
>
> Christoph


Hi Christoph.

Fl::first_window() returns the top-most of all FLTK windows of you  
application. Fl::next_window(some window) returns the next window in  
the stacking order unless messed with by the OS. Consequently, show()  
wil make the shown window also the Fl::first_window(). FLTK relies on  
this functionality to distribute various events correctly (mouse  
wheels among them, but also shortcuts, etc.). Messing with the window  
order is a very bad idea. "show()" and "hide()" are the only correct  
way to cahnge stacking order (and the window order)

Matthias

PS: you can always create a copy of the current list of windows using  
first_window and next_window and use that list as a base for your  
window cycling.

----
http://robowerk.com/


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

Reply via email to