Author: AlbrechtS Date: 2011-08-19 07:11:30 -0700 (Fri, 19 Aug 2011) New Revision: 8983 Log: 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. Modified: branches/branch-1.3/src/Fl_win32.cxx Modified: branches/branch-1.3/src/Fl_win32.cxx =================================================================== --- branches/branch-1.3/src/Fl_win32.cxx 2011-08-19 12:18:03 UTC (rev 8982) +++ branches/branch-1.3/src/Fl_win32.cxx 2011-08-19 14:11:30 UTC (rev 8983) @@ -1293,9 +1293,11 @@ } //Proceed to positioning the window fully inside the screen, if possible + //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, W, H); //Make border's lower right corner visible - int scr_x, scr_y, scr_w, scr_h; - Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y); 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 _______________________________________________ fltk-commit mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-commit
