diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-31 20:31:39 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-31 20:31:39 +0000 |
| commit | 782abe6de6c801f48f98fe55a6a9b8626d7bd4ec (patch) | |
| tree | 42631bcd85eccc4b6e7eff2f9f06c6cbf6dd77c0 /src/forms_compatability.cxx | |
| parent | 3ec9646eeadbfa63c5fdd975f36791852b1e2c37 (diff) | |
Added MacOS X monitor support.
Now use new screen_xywh() API for keeping things on the current screen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/forms_compatability.cxx')
| -rwxr-xr-x | src/forms_compatability.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/forms_compatability.cxx b/src/forms_compatability.cxx index c920a7008..01bcb2eb7 100755 --- a/src/forms_compatability.cxx +++ b/src/forms_compatability.cxx @@ -95,8 +95,11 @@ void fl_show_form(Fl_Window *f,int place,int b,const char *n) { if (place & FL_PLACE_MOUSE) f->hotspot(f); - if (place & FL_PLACE_CENTER) - f->position((Fl::w()-f->w())/2, (Fl::h()-f->h())/2); + if (place & FL_PLACE_CENTER) { + int scr_x, scr_y, scr_w, scr_h; + Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h); + f->position(scr_x+(scr_w-f->w())/2, scr_y+(scr_h-f->h())/2); + } if (place & FL_PLACE_FULLSCREEN) f->fullscreen(); |
