[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - vcl/unx

Caolán McNamara caolanm at redhat.com
Fri Mar 15 05:08:05 PDT 2013


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

New commits:
commit e00ed9262e16ad2a9b421ff004f94096d36d9e17
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 15 11:00:56 2013 +0000

    Related: rhbz#906137 g_module_symbol returned nothing
    
    for gdk_screen_get_primary_monitor but osl_getAsciiFunctionSymbol does the
    right thing
    
    Change-Id: Ibf1a17724a9393d95c4fbe0d26aa82148eea33a9
    Reviewed-on: https://gerrit.libreoffice.org/2744
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index f5862c2..48bc239 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <string.h>
-#include <gmodule.h>
 #include <gtk/gtk.h>
 #include <unx/gtk/gtkinst.hxx>
 #include <unx/gtk/gtksys.hxx>
@@ -201,11 +200,8 @@ static int _get_primary_monitor (GdkScreen *pScreen)
     // Perhaps we have a newer gtk+ with this symbol:
     if (!get_fn)
     {
-        GModule *module = g_module_open (NULL, (GModuleFlags) 0);
-        if (!g_module_symbol (module, "gdk_screen_get_primary_monitor",
-                              (gpointer *)&get_fn))
-            get_fn = NULL;
-        g_module_close (module);
+        get_fn = (int(*)(GdkScreen*))osl_getAsciiFunctionSymbol(NULL,
+            "gdk_screen_get_primary_monitor");
     }
 #if GTK_CHECK_VERSION(2,14,0)
     if (!get_fn)


More information about the Libreoffice-commits mailing list