On 15 Oct 2011, at 22:26, Evan Laforge wrote:
> So I noticed that when I save windows on the non-primary screen, quit
> and restore, they wind up on the primary screen. It looks like on OS
> X, show() will move the window back on to the primary screen. So I
> overrode show:
>
> void
> BlockViewWindow::show()
> {
> IRect requested = rect(this);
> Fl_Double_Window::show();
> if (rect(this) != requested) {
> IRect screen;
> Fl::screen_xywh(screen.x, screen.y, screen.w, screen.h,
> requested.x, requested.y);
> if (screen.contains(IPoint(requested.x, requested.y)))
> this->position(requested.x, requested.y);
> }
> }
>
> The idea is that if the screen the window wants to be on exists, then
> move it again where it wanted to go. Otherwise, let it stay where the
> OS put it. This works ok but does lead to an annoying flicker since I
> have to wait until after show() to move the window.
>
> I poked into Fl_cocoa.mm and the key function seems to be
> Fl_X::make(). There's some fiddling with FORCE_POSITION, but I don't
> think this is quite what I want. I think it should appear where
> requested if that's on a screen that exists, and otherwise pick some
> reasonable spot on the main screen.
>
> Does this seem like reasonable behaviour for the default show?
We probably need at STR for this, as it does sound like a bug...
Wonder what the other hosts systems do?
Can you raise an STR with what you've found on OSX, please?
Thanks...
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev