summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2012-10-24 08:28:18 +0000
committerPierre Ossman <ossman@cendio.se>2012-10-24 08:28:18 +0000
commit208b2ead8a9af2b06d1261be9a8e98f48689aed1 (patch)
treebabd5a9c977259507cfcceddf8b075639d3099e3
parent2fa1aee1dae9e647c589ad886b0943ea4374e437 (diff)
downloadtigervnc-208b2ead8a9af2b06d1261be9a8e98f48689aed1.tar.gz
tigervnc-208b2ead8a9af2b06d1261be9a8e98f48689aed1.zip
Fl::screen_work_area() was added after FLTK 1.3.0, so we need to have
checks that it is actually present on the current system. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5008 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--CMakeLists.txt3
-rw-r--r--config.h.in1
-rw-r--r--vncviewer/DesktopWindow.cxx10
3 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6177107f..ea91f7a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -286,6 +286,9 @@ if(FLTK_FOUND)
# FLTK STR #2660
check_cxx_source_compiles("#include <FL/Fl_Window.H>\nint main(int c, char** v) { void (Fl_Window::*foo)(const Fl_RGB_Image*,int,int) = &Fl_Window::cursor; return 0; }" HAVE_FLTK_CURSOR)
+ # FLTK STR #2697
+ check_cxx_source_compiles("#include <FL/Fl.H>\nint main(int c, char** v) { int X, Y, W, H; Fl::screen_work_area(X, Y, W, H); return 0; }" HAVE_FLTK_WORK_AREA)
+
# FLTK STR #2816
check_cxx_source_compiles("#include <FL/Fl_Window.H>\nint main(int c, char** v) { Fl_Window::default_icons(0, 0); return 0; }" HAVE_FLTK_ICONS)
diff --git a/config.h.in b/config.h.in
index 55cd652d..0d209521 100644
--- a/config.h.in
+++ b/config.h.in
@@ -21,6 +21,7 @@
#cmakedefine HAVE_FLTK_FULLSCREEN
#cmakedefine HAVE_FLTK_FULLSCREEN_SCREENS
#cmakedefine HAVE_FLTK_CURSOR
+#cmakedefine HAVE_FLTK_WORK_AREA
#cmakedefine HAVE_FLTK_ICONS
#cmakedefine HAVE_ACTIVE_DESKTOP_H
#cmakedefine HAVE_ACTIVE_DESKTOP_L
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index b00fc93c..746f3413 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -110,8 +110,13 @@ DesktopWindow::DesktopWindow(int w, int h, const char *name,
// On OS X we can do the maximize thing properly before the
// window is showned. Other platforms handled further down...
if (maximize) {
+#ifdef HAVE_FLTK_WORK_AREA
int dummy;
Fl::screen_work_area(dummy, dummy, w, h, geom_x, geom_y);
+#else
+ w = Fl::w();
+ h = Fl::h();
+#endif
}
#endif
@@ -610,7 +615,12 @@ void DesktopWindow::maximizeWindow()
return;
#endif
int X, Y, W, H;
+#ifdef HAVE_FLTK_WORK_AREA
Fl::screen_work_area(X, Y, W, H, this->x(), this->y());
+#else
+ W = Fl::w();
+ H = Fl::h();
+#endif
size(W, H);
#else
// X11