summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-02-17 16:09:01 +0000
committerChris Sherlock <chris.sherlock79@gmail.com>2016-02-18 04:30:42 +0000
commit9f7f881d11ceb4e2534758b9507a55292ec697b0 (patch)
tree982d64a1941f8ece01063c02aac0ec570608e85a /stoc
parent2966d57bdfdd40a55e31408f7da75b415e809d8e (diff)
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@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/javavm/javavm.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index c7a061c057e6..64b55f76b55b 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -534,8 +534,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(OUString("swing.systemlaf=javax.swing.plaf.metal.MetalLookAndFeel"));
+
+ setTimeZone(pjvm);
}
class DetachCurrentThread: private boost::noncopyable {