mirror of https://github.com/fltk/fltk
Fix STR #2559: go correctly fullscreen when several displays on X11
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8412 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
d36013aed9
commit
1125cf5385
|
@ -66,7 +66,7 @@ void Fl_Window::fullscreen() {
|
||||||
//determine its thickness
|
//determine its thickness
|
||||||
border(0);
|
border(0);
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) || defined(WIN32)
|
#if defined(__APPLE__) || defined(WIN32) || defined(USE_X11)
|
||||||
int sx, sy, sw, sh;
|
int sx, sy, sw, sh;
|
||||||
Fl::screen_xywh(sx, sy, sw, sh, x()+w()/2, y()+h()/2);
|
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 we are on the main screen, we will leave the system menu bar unobstructed
|
||||||
|
@ -77,7 +77,7 @@ void Fl_Window::fullscreen() {
|
||||||
if (x()==sx) x(sx+1); // make sure that we actually execute the resize
|
if (x()==sx) x(sx+1); // make sure that we actually execute the resize
|
||||||
resize(sx, sy, sw, sh);
|
resize(sx, sy, sw, sh);
|
||||||
#else
|
#else
|
||||||
if (!x()) x(1); // force it to call XResizeWindow()
|
if (!x()) x(1); // make sure that we actually execute the resize
|
||||||
resize(0,0,Fl::w(),Fl::h());
|
resize(0,0,Fl::w(),Fl::h());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue