> >  I was wondering if there is a method which allows
> > positioning of a window on the screen in a certain range
> > (that is: the user can use the WM bar to move the window
> > between some preset default coordinates), something more or
> > less similar to Fl_Window::size_range(...). Alternatively,
> > does somebody have an idea about any simpler way to realize
> > that, other than deriving a My_Limited_Fl_Window class?!
>
> I'm pretty sure that on most (all?) platforms positioning of windows
> is pretty much the domain of the window manager.
> So unless there's some way to ask the window manager to constrain your
> window position (and with some WM's there is, IIRC) then you are
> probably stuck.

 Well, I thought that if one can set the window->position(...) passing that 
information to the WM, one should be able to put also some limitations on it.

> But even if your WM of choice does do this, then it's probable it
> wouldn't work for another platform, or even for an alternate WM on the
> same platform, so...

 Portability issues are right now of very low concern, I am still using KDE 3.5 
under linux.

> In short, you probably will need to write a "My_Limited_Fl_Window"
> class, and even then (on some WM/platform combinations) you'll
> probably be allowed to drag it to some "illegal" position then have
> it snap back to a "permitted" location when you release the drag...
> Which is probably not what you'd want.

 No, not really. :-) Actually, the limitation works pretty well with a 
borderless window dragged through fltk-based callback (that is without 
"illegal" positions), but for now I want to use the WM bar. If nobody has a 
better idea, I'll try a special derived class.

 Thank you for your answer,
      Z.B.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to