[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - stoc/source vcl/unx
Caolán McNamara
caolanm at redhat.com
Thu Feb 18 10:55:11 UTC 2016
stoc/source/javavm/javavm.cxx | 9 ++++++++-
vcl/unx/gtk/gtksys.cxx | 7 +++++++
2 files changed, 15 insertions(+), 1 deletion(-)
New commits:
commit f63a958897db113cef93490e562d4a2d7f88e49b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 17 16:09:01 2016 +0000
Resolves: rhbz#1285356 force swing not to use gtk2 if gtk3 is loaded
Change-Id: I6347bf4c25ce649073afdfe4225182ab2dc84af1
Reviewed-on: https://gerrit.libreoffice.org/22433
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
(cherry picked from commit 9f7f881d11ceb4e2534758b9507a55292ec697b0)
Reviewed-on: https://gerrit.libreoffice.org/22463
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 64db8c8..e24ea4c 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -536,8 +536,15 @@ void initVMConfiguration(
}
*pjvm= jvm;
- setTimeZone(pjvm);
+ // rhbz#1285356, native look will be gtk2, which crashes
+ // when gtk3 is already loaded. Until there is a solution
+ // java-side force look and feel to something that doesn't
+ // crash when we are using gtk3
+ if (getenv("STOC_FORCE_SYSTEM_LAF"))
+ pjvm->pushProp("swing.systemlaf=javax.swing.plaf.metal.MetalLookAndFeel");
+
+ setTimeZone(pjvm);
}
class DetachCurrentThread: private boost::noncopyable {
diff --git a/vcl/unx/gtk/gtksys.cxx b/vcl/unx/gtk/gtksys.cxx
index 8d79c98..e663bb9 100644
--- a/vcl/unx/gtk/gtksys.cxx
+++ b/vcl/unx/gtk/gtksys.cxx
@@ -40,6 +40,13 @@ GtkSalSystem::GtkSalSystem() : SalGenericSystem()
{
mpDisplay = gdk_display_get_default();
countScreenMonitors();
+#if GTK_CHECK_VERSION(3,0,0)
+ // rhbz#1285356, native look will be gtk2, which crashes
+ // when gtk3 is already loaded. Until there is a solution
+ // java-side force look and feel to something that doesn't
+ // crash when we are using gtk3
+ setenv("STOC_FORCE_SYSTEM_LAF", "true", 1);
+#endif
}
GtkSalSystem::~GtkSalSystem()
More information about the Libreoffice-commits
mailing list