From 782abe6de6c801f48f98fe55a6a9b8626d7bd4ec Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 31 Mar 2005 20:31:39 +0000 Subject: 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 --- src/forms_compatability.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/forms_compatability.cxx') 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(); -- cgit v1.2.3