From 8cd25c4ecb436fc271d6ef06d0f4e105451d123f Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 28 Nov 2005 15:41:39 +0000 Subject: STR #1082: Made sur that "fullscreen" on Mac does not cover the top menu bar. If you still must do that, you can use the screen interface to get the true screen size of the main screen and resize the window accordingly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4667 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Window_fullscreen.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Fl_Window_fullscreen.cxx b/src/Fl_Window_fullscreen.cxx index 7dd976183..698e806a5 100644 --- a/src/Fl_Window_fullscreen.cxx +++ b/src/Fl_Window_fullscreen.cxx @@ -68,8 +68,13 @@ void Fl_Window::fullscreen() { //determine its thickness border(0); #endif +#ifdef __APPLE__ + if (x()==Fl::x()) x(x()+1); // force it to call ResizeWindow() + resize(Fl::x(),Fl::y(),Fl::w(),Fl::h()); +#else if (!x()) x(1); // force it to call XResizeWindow() resize(0,0,Fl::w(),Fl::h()); +#endif } void Fl_Window::fullscreen_off(int X,int Y,int W,int H) { -- cgit v1.2.3