From 671fecf0cf9f5b5f00d05b39943a423da4ed5451 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Feb 17 2016 20:44:06 +0000 Subject: Resolves: rhbz#1285356 force swing to not use gtk2 if gtk3 is loaded --- diff --git a/0001-Resolves-rhbz-1285356-force-swing-not-to-use-gtk2-if.patch b/0001-Resolves-rhbz-1285356-force-swing-not-to-use-gtk2-if.patch new file mode 100644 index 0000000..4b56773 --- /dev/null +++ b/0001-Resolves-rhbz-1285356-force-swing-not-to-use-gtk2-if.patch @@ -0,0 +1,54 @@ +From 3d7489f4c6e1826bbfbf73c8665aa28a5b2f6a90 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 17 Feb 2016 16:09:01 +0000 +Subject: [PATCH 1/2] Resolves: rhbz#1285356 force swing not to use gtk2 if + gtk3 is loaded + +Change-Id: I6347bf4c25ce649073afdfe4225182ab2dc84af1 +--- + stoc/source/javavm/javavm.cxx | 9 ++++++++- + vcl/unx/gtk/gtksys.cxx | 7 +++++++ + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx +index c7a061c..64b55f7 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 { +diff --git a/vcl/unx/gtk/gtksys.cxx b/vcl/unx/gtk/gtksys.cxx +index 80153fe..97f2464 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() +-- +2.7.1 + diff --git a/libreoffice.spec b/libreoffice.spec index 109e023..b761e6e 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -300,6 +300,7 @@ Patch65: 0001-Resolves-tdf-97465-like-wheel-ignore-swipe-for-sc-in.patch Patch66: 0001-use-the-users-preferred-initials-for-impress-annotat.patch Patch67: 0001-reportbuilder-tdf-92720-add-loext-namespace.patch Patch68: 0001-update-graphite-to-1.3.5.patch +Patch69: 0001-Resolves-rhbz-1285356-force-swing-not-to-use-gtk2-if.patch %if 0%{?rhel} # not upstreamed @@ -2217,9 +2218,10 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog -* Sun Feb 07 2016 David Tardon - 1:5.0.5.2-2.UNBUILT +* Wed Feb 17 2016 Caolán McNamara - 1:5.0.5.2-2 - Resolves: tdf#92720 report builder loses embedded charts - update to graphite 1.3.5 possible behaviour changes +- Resolves: rhbz#1285356 force swing to not use gtk2 if gtk3 is loaded * Sun Feb 07 2016 David Tardon - 1:5.0.5.2-1 - update to 5.0.5 rc2