diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-10-26 16:11:17 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-10-26 16:12:27 +0100 |
commit | 6484c6583ce4393155b1760c6d4e2a944d34a774 (patch) | |
tree | 01c10a8e31bbb45eb80d56a918689cb448cf788e /vcl | |
parent | 7fe4fa13c1f82524bd7b1f526adb851c67e1706f (diff) |
gtk3: gdk_screen_get_monitor_plug_name is only present > gtk 2.14
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk/app/gtksys.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx index a80e68a7b465..a2cbe652b367 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 |