Fix window positioning on screen (Fl_X::fake_X_wm()) by testing the

entire window area instead of the top left corner only to find the
screen to put the window on (Windows only).

Note that this *should* be changed to use the work area instead of
the screen area, as discussed in fltk.development.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser
2011-08-19 14:11:30 +00:00
parent ce3185a94f
commit 06ec8900f0
+4 -2
View File
@@ -1293,9 +1293,11 @@ int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by)
}
//Proceed to positioning the window fully inside the screen, if possible
//Make border's lower right corner visible
//Find screen that contains most of the window
//FIXME: this ought to be the "work area" instead of the entire screen !
int scr_x, scr_y, scr_w, scr_h;
Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y);
Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y, W, H);
//Make border's lower right corner visible
if (scr_x+scr_w < X+W) X = scr_x+scr_w - W;
if (scr_y+scr_h < Y+H) Y = scr_y+scr_h - H;
//Make border's upper left corner visible