This change will make sure that top-level windows will fit inside the screen that contains the original x and y.

The previous version would reposition windows in the screen that currently contains the mouse. That feature made it impossible to position tool windows on a second monitor, etc. . 

This change does not affect popup windows which will still pop up in the screen that has the mouse pointer.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4559 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2005-09-09 09:52:16 +00:00
parent bde4916c7e
commit 820b67bc56
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1036,7 +1036,7 @@ 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
int scr_x, scr_y, scr_w, scr_h;
Fl::screen_xywh(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
+1 -1
View File
@@ -1052,7 +1052,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
// force the window to be on-screen. Usually the X window manager
// does this, but a few don't, so we do it here for consistency:
int scr_x, scr_y, scr_w, scr_h;
Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h);
Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y);
if (win->border()) {
// ensure border is on screen: