diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2011-08-19 14:11:30 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2011-08-19 14:11:30 +0000 |
| commit | 06ec8900f0bffbd0be2c4aff21aef221cf06f49b (patch) | |
| tree | a63158d48c5418ed1585e235a7b3876e197530a6 /src | |
| parent | ce3185a94f25a79210cc17443b01b34510155ece (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_win32.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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 |
