From 15d97f371f95d84411d30e969470930807adbf7e Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 11 May 2012 12:25:25 +0200 Subject: [PATCH] Resolves: fdo#49365 Libreoffice fails to start on second screen with gtk vcl plugin --- ...tly-map-monitor-index-back-to-screen.patch | 26 +++++++++++++++++++ ...g-index-twice-in-one-run-seems-wrong.patch | 25 ++++++++++++++++++ libreoffice.spec | 6 +++++ 3 files changed, 57 insertions(+) create mode 100644 0001-fdo-49365-correctly-map-monitor-index-back-to-screen.patch create mode 100644 0001-incrementing-index-twice-in-one-run-seems-wrong.patch diff --git a/0001-fdo-49365-correctly-map-monitor-index-back-to-screen.patch b/0001-fdo-49365-correctly-map-monitor-index-back-to-screen.patch new file mode 100644 index 0000000..300ad83 --- /dev/null +++ b/0001-fdo-49365-correctly-map-monitor-index-back-to-screen.patch @@ -0,0 +1,26 @@ +From 85211f1ef30b07927d768348ce28ac34ade62f03 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Wed, 2 May 2012 14:26:11 +0200 +Subject: [PATCH] fdo#49365 correctly map monitor index back to screen + +Change-Id: I396b34119a2686011640d5f15de616fe2a166237 +--- + vcl/unx/gtk/app/gtksys.cxx | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx +index 3927dbf..538107f 100644 +--- a/vcl/unx/gtk/app/gtksys.cxx ++++ b/vcl/unx/gtk/app/gtksys.cxx +@@ -92,7 +92,7 @@ GtkSalSystem::getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, gint &nMo + pScreen = gdk_display_get_screen (pDisplay, i); + if (!pScreen) + break; +- if (nIdx > gdk_screen_get_n_monitors (pScreen)) ++ if (nIdx >= gdk_screen_get_n_monitors (pScreen)) + nIdx -= gdk_screen_get_n_monitors (pScreen); + else + break; +-- +1.7.7.6 + diff --git a/0001-incrementing-index-twice-in-one-run-seems-wrong.patch b/0001-incrementing-index-twice-in-one-run-seems-wrong.patch new file mode 100644 index 0000000..772bfdb --- /dev/null +++ b/0001-incrementing-index-twice-in-one-run-seems-wrong.patch @@ -0,0 +1,25 @@ +From 9d5da4e1d12c224286f871b28b7df31215f67d31 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Thu, 26 Apr 2012 06:36:22 +0200 +Subject: [PATCH] incrementing index twice in one run seems wrong + +--- + vcl/unx/gtk/app/gtksys.cxx | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx +index bf3fba7..3927dbf 100644 +--- a/vcl/unx/gtk/app/gtksys.cxx ++++ b/vcl/unx/gtk/app/gtksys.cxx +@@ -89,7 +89,7 @@ GtkSalSystem::getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, gint &nMo + GdkScreen *pScreen = NULL; + for (gint i = 0; i < gdk_display_get_n_screens (pDisplay); i++) + { +- pScreen = gdk_display_get_screen (pDisplay, i++); ++ pScreen = gdk_display_get_screen (pDisplay, i); + if (!pScreen) + break; + if (nIdx > gdk_screen_get_n_monitors (pScreen)) +-- +1.7.7.6 + diff --git a/libreoffice.spec b/libreoffice.spec index 74a198f..e0d4f27 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -146,6 +146,8 @@ Patch32: 0001-do-not-let-gcc-use-registers-we-are-setting-ourselve.patch Patch33: 0001-wrong-types-used-here-breaks-64bit-bigendian.patch Patch34: 0001-Resolves-rhbz-805743-a11y-call-doShow-after-we-have-.patch Patch35: 0001-do-not-prepend-n-twice-it-confuses-KFileDialog-rhbz-.patch +Patch36: 0001-incrementing-index-twice-in-one-run-seems-wrong.patch +Patch37: 0001-fdo-49365-correctly-map-monitor-index-back-to-screen.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -1008,6 +1010,8 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch33 -p1 -b .wrong-types-used-here-breaks-64bit-bigendian.patch %patch34 -p1 -b .rhbz-805743-a11y-call-doShow-after-we-have-.patch %patch35 -p1 -b .do-not-prepend-n-twice-it-confuses-KFileDialog-rhbz-.patch +%patch36 -p1 -b .rhbz-809019-count-mirrored-monitors-as-one.patch +%patch37 -p1 -b .incrementing-index-twice-in-one-run-seems-wrong.patch # TODO: check this # these are horribly incomplete--empty translations and copied english @@ -2297,6 +2301,8 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %changelog * Fri May 11 2012 David Tardon - 3.5.3.2-4 - Resolves: rhbz#820439 KDE export dialog broken for most formats +- Resolves: fdo#49365 Libreoffice fails to start on second screen with + gtk vcl plugin * Wed May 09 2012 Caolán McNamara - 3.5.3.2-3 - Resolves: rhbz#805743 a11y crash in impress/draw