From 06ec8900f0bffbd0be2c4aff21aef221cf06f49b Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 19 Aug 2011 14:11:30 +0000 Subject: 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 --- src/Fl_win32.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index ed97ab88a..1774c416b 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -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 -- cgit v1.2.3