summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-11-28 15:41:39 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-11-28 15:41:39 +0000
commit8cd25c4ecb436fc271d6ef06d0f4e105451d123f (patch)
treed8c87b578065ef66877e5a5c4aa2cad89aaa31d5
parent1370a6b2686256012b2e6ed2ce13be70bf726d6b (diff)
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
-rw-r--r--src/Fl_Window_fullscreen.cxx5
1 files changed, 5 insertions, 0 deletions
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) {