> But this only works, when additional screen is placed to right top side
> of first screen. When the second screen is placed different (maybe on
> top of first screen) the offset changes.
I've run my test code on Mac OS X, Windows, and Linux. I've found 2 things.
Positioning windows onto the second screen using coordinates extracted via
Fl::screen_xywh() works fine on Windows and Linux. Something about the Mac OS
X implementation is giving a problem. It appears that instead of putting the
window at the x coordinate beyond the edge of the first screen onto the second
screen, it "wraps around" and adds additional rows. You can, however, drag
windows onto the second screen with no problems on all platforms. You just
can't do it using the constructor or the position() member function.
I have an addition question. In Fl_Window_fullscreen.cxx, in the fullscreen()
function it reads:
void Fl_Window::fullscreen() {
#ifndef WIN32
//this would clobber the fake wm, since it relies on the border flags to
//determine its thickness
border(0);
#endif
#if defined(__APPLE__) || defined(WIN32)
int sx, sy, sw, sh;
Fl::screen_xywh(sx, sy, sw, sh, x()+w()/2, y()+h()/2);
// if we are on the main screen, we will leave the system menu bar
unobstructed
if (Fl::x()>=sx && Fl::y()>=sy && Fl::x()+Fl::w()<=sx+sw &&
Fl::y()+Fl::h()<=sy+sh) {
sx = Fl::x(); sy = Fl::y();
sw = Fl::w(); sh = Fl::h();
}
if (x()==sx) x(sx+1); // make sure that we actually execute the resize
resize(sx, sy, sw, sh);
#else
if (!x()) x(1); // force it to call XResizeWindow()
resize(0,0,Fl::w(),Fl::h());
#endif
}
I don't understand why the X-11 implementation should be different from the Mac
OS X and Windows implementation. On Linux, when I call fullscreen(), this
function makes the resulting window span both monitors minus the system menu
bar, which is not the behavior that I want. The behavior is what I expect on
Linux when I comment out:
#if defined(__APPLE__) || defined(WIN32)
and
#else
if (!x()) x(1); // force it to call XResizeWindow()
resize(0,0,Fl::w(),Fl::h());
#endif
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk