[Libreoffice-commits] .: vcl/unx

Michael Meeks michael at kemper.freedesktop.org
Wed Oct 26 08:11:51 PDT 2011


 vcl/unx/gtk/app/gtksys.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 6484c6583ce4393155b1760c6d4e2a944d34a774
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Oct 26 16:11:17 2011 +0100

    gtk3: gdk_screen_get_monitor_plug_name is only present > gtk 2.14

diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index a80e68a..a2cbe65 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -107,6 +107,7 @@ bool GtkSalSystem::IsMultiDisplay()
     return gdk_display_get_n_screens (mpDisplay) > 1;
 }
 
+#if GTK_CHECK_VERSION(2,14,0)
 namespace {
 static int _fallback_get_primary_monitor (GdkScreen *pScreen)
 {
@@ -122,6 +123,7 @@ static int _fallback_get_primary_monitor (GdkScreen *pScreen)
     }
     return 0;
 }
+#endif
 
 static int _get_primary_monitor (GdkScreen *pScreen)
 {
@@ -138,10 +140,14 @@ static int _get_primary_monitor (GdkScreen *pScreen)
             get_fn = NULL;
         g_module_close (module);
     }
+#if GTK_CHECK_VERSION(2,14,0)
     if (!get_fn)
         get_fn = _fallback_get_primary_monitor;
-
-    return get_fn (pScreen);
+#endif
+    if (get_fn)
+        return get_fn (pScreen);
+    else
+        return 0;
 }
 } // end anonymous namespace
 


More information about the Libreoffice-commits mailing list