Revision: 5008
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=5008&view=rev
Author:   ossman_
Date:     2012-10-24 08:28:18 +0000 (Wed, 24 Oct 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/CMakeLists.txt
    trunk/config.h.in
    trunk/vncviewer/DesktopWindow.cxx

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt        2012-10-24 08:25:20 UTC (rev 5007)
+++ trunk/CMakeLists.txt        2012-10-24 08:28:18 UTC (rev 5008)
@@ -286,6 +286,9 @@
   # 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)
 

Modified: trunk/config.h.in
===================================================================
--- trunk/config.h.in   2012-10-24 08:25:20 UTC (rev 5007)
+++ trunk/config.h.in   2012-10-24 08:28:18 UTC (rev 5008)
@@ -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

Modified: trunk/vncviewer/DesktopWindow.cxx
===================================================================
--- trunk/vncviewer/DesktopWindow.cxx   2012-10-24 08:25:20 UTC (rev 5007)
+++ trunk/vncviewer/DesktopWindow.cxx   2012-10-24 08:28:18 UTC (rev 5008)
@@ -110,8 +110,13 @@
   // 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 @@
     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

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to