extra/libreoffice-fresh to 5.2.0-4

This commit is contained in:
Kevin Mihelich 2016-08-28 20:33:06 +00:00
parent b084dc660b
commit d538cb2d03
2 changed files with 165 additions and 3 deletions

View file

@ -19,7 +19,7 @@ pkgbase=libreoffice-fresh
pkgname=('libreoffice-fresh-sdk' 'libreoffice-fresh') pkgname=('libreoffice-fresh-sdk' 'libreoffice-fresh')
_LOver=5.2.0.4 _LOver=5.2.0.4
pkgver=5.2.0 pkgver=5.2.0
pkgrel=3 pkgrel=4
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
license=('LGPL3') license=('LGPL3')
url="http://www.libreoffice.org/" url="http://www.libreoffice.org/"
@ -71,7 +71,8 @@ source=(${_mirror}/libreoffice{,-help,-translations}-${_LOver}.tar.xz{,.asc}
libreoffice-fresh.sh libreoffice-fresh.csh libreoffice-fresh.sh libreoffice-fresh.csh
update_liborcus_to_0.11.0.diff update_liborcus_to_0.11.0.diff
remove_unnecessary_orcus_external_usage_from_makefiles.diff remove_unnecessary_orcus_external_usage_from_makefiles.diff
buildfix.diff) buildfix.diff
fix_gtk3_smooth_scolling.diff)
noextract=(boost_1_60_0.tar.bz2 noextract=(boost_1_60_0.tar.bz2
ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz
35c94d2df8893241173de1d16b6034c0-swingExSrc.zip 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
@ -134,7 +135,8 @@ md5sums=('40ee24812d171238981599843ca9f5b6'
'e7e4b3e70e99e5cba8f8dfcacf3b0d87' 'e7e4b3e70e99e5cba8f8dfcacf3b0d87'
'3f526b966a672d1237cfcbadae0e3f95' '3f526b966a672d1237cfcbadae0e3f95'
'ac71e21ecc0976b2ea6e233854963d4b' 'ac71e21ecc0976b2ea6e233854963d4b'
'd386f3a0b484cd3929329a294159f5bc') 'd386f3a0b484cd3929329a294159f5bc'
'7e827ccdda93cc70e94a0766c0509a11')
prepare() { prepare() {
@ -150,6 +152,9 @@ prepare() {
# https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-5-2&id=e13db0f16c4ac5a243587e881d7b18979d07f478 # https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-5-2&id=e13db0f16c4ac5a243587e881d7b18979d07f478
patch -Np1 -i ../buildfix.diff patch -Np1 -i ../buildfix.diff
# https://cgit.freedesktop.org/libreoffice/core/patch/?id=3e60438dad304c487973fb8cdb50f3d94932af2e
patch -Np1 -i ../fix_gtk3_smooth_scolling.diff
# don't run broken tests on i686 # don't run broken tests on i686
[ "$CARCH" = "i686" ] && sed -i "/CppunitTest_sw_ooxmlexport7/d" sw/Module_sw.mk [ "$CARCH" = "i686" ] && sed -i "/CppunitTest_sw_ooxmlexport7/d" sw/Module_sw.mk

View file

@ -0,0 +1,157 @@
From 3e60438dad304c487973fb8cdb50f3d94932af2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 23 Jun 2016 17:32:11 +0100
Subject: Resolves: rhbz#1349501 gtk3: smooth scrolling events can be
disabled...
by the user with GDK_CORE_DEVICE_EVENTS=1, and so manage to disable their wheel
scrolling
Change-Id: I7df63f738983c90dea75b9f43a36133910446aba
(cherry picked from commit 7dfd50f947671d79b9119f10259857700d5728d8)
Resolves: rhbz#1349501 gtk3: smooth scrolling events can be disabled...
better fix, if we listen to the eventbox we get either SMOOTH scrolling
or not smooth events, not both. We get SMOOTH when supported, and not
if not supported so no need to reintroduce the miserable hack, which
doesn't work under wayland anyway
Change-Id: I993e71d3553322425a506cd93d812efe081bf3c9
Reviewed-on: https://gerrit.libreoffice.org/26645
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index e8d12e3..2b7ade6 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1013,6 +1013,7 @@ void GtkSalFrame::InitCommon()
m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "drag-failed", G_CALLBACK(signalDragFailed), this ));
m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "drag-data-delete", G_CALLBACK(signalDragDelete), this ));
m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "drag-data-get", G_CALLBACK(signalDragDataGet), this ));
+ m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "scroll-event", G_CALLBACK(signalScroll), this ));
g_signal_connect( G_OBJECT(m_pFixedContainer), "draw", G_CALLBACK(signalDraw), this );
g_signal_connect( G_OBJECT(m_pFixedContainer), "size-allocate", G_CALLBACK(sizeAllocated), this );
@@ -1038,7 +1039,6 @@ void GtkSalFrame::InitCommon()
g_signal_connect( G_OBJECT(m_pWindow), "key-release-event", G_CALLBACK(signalKey), this );
g_signal_connect( G_OBJECT(m_pWindow), "delete-event", G_CALLBACK(signalDelete), this );
g_signal_connect( G_OBJECT(m_pWindow), "window-state-event", G_CALLBACK(signalWindowState), this );
- g_signal_connect( G_OBJECT(m_pWindow), "scroll-event", G_CALLBACK(signalScroll), this );
g_signal_connect( G_OBJECT(m_pWindow), "leave-notify-event", G_CALLBACK(signalCrossing), this );
g_signal_connect( G_OBJECT(m_pWindow), "enter-notify-event", G_CALLBACK(signalCrossing), this );
g_signal_connect( G_OBJECT(m_pWindow), "visibility-notify-event", G_CALLBACK(signalVisibility), this );
@@ -2664,9 +2664,6 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEventScroll* pEvent, gpointer
{
UpdateLastInputEventTime(pEvent->time);
- if (pEvent->direction != GDK_SCROLL_SMOOTH)
- return false;
-
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
SalWheelMouseEvent aEvent;
@@ -2679,36 +2676,74 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEventScroll* pEvent, gpointer
aEvent.mnY = (sal_uLong)pEvent->y;
aEvent.mnCode = GetMouseModCode( pEvent->state );
- // rhbz#1344042 "Traditionally" in gtk3 we tool a single up/down event as
- // equating to 3 scroll lines and a delta of 120. So scale the delta here
- // by 120 where a single mouse wheel click is an incoming delta_x of 1
- // and divide that by 40 to get the number of scrollines
- if (pEvent->delta_x != 0.0)
+ switch (pEvent->direction)
{
- aEvent.mnDelta = -pEvent->delta_x * 120;
- aEvent.mnNotchDelta = aEvent.mnDelta < 0 ? -1 : +1;
- if (aEvent.mnDelta == 0)
- aEvent.mnDelta = aEvent.mnNotchDelta;
- aEvent.mbHorz = true;
- aEvent.mnScrollLines = std::abs(aEvent.mnDelta) / 40;
- if (aEvent.mnScrollLines == 0)
- aEvent.mnScrollLines = 1;
+ case GDK_SCROLL_SMOOTH:
+ // rhbz#1344042 "Traditionally" in gtk3 we tool a single up/down event as
+ // equating to 3 scroll lines and a delta of 120. So scale the delta here
+ // by 120 where a single mouse wheel click is an incoming delta_x of 1
+ // and divide that by 40 to get the number of scrollines
+ if (pEvent->delta_x != 0.0)
+ {
+ aEvent.mnDelta = -pEvent->delta_x * 120;
+ aEvent.mnNotchDelta = aEvent.mnDelta < 0 ? -1 : +1;
+ if (aEvent.mnDelta == 0)
+ aEvent.mnDelta = aEvent.mnNotchDelta;
+ aEvent.mbHorz = true;
+ aEvent.mnScrollLines = std::abs(aEvent.mnDelta) / 40;
+ if (aEvent.mnScrollLines == 0)
+ aEvent.mnScrollLines = 1;
+
+ pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
+ }
- pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
- }
+ if (pEvent->delta_y != 0.0)
+ {
+ aEvent.mnDelta = -pEvent->delta_y * 120;
+ aEvent.mnNotchDelta = aEvent.mnDelta < 0 ? -1 : +1;
+ if (aEvent.mnDelta == 0)
+ aEvent.mnDelta = aEvent.mnNotchDelta;
+ aEvent.mbHorz = false;
+ aEvent.mnScrollLines = std::abs(aEvent.mnDelta) / 40;
+ if (aEvent.mnScrollLines == 0)
+ aEvent.mnScrollLines = 1;
+
+ pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
+ }
- if (pEvent->delta_y != 0.0)
- {
- aEvent.mnDelta = -pEvent->delta_y * 120;
- aEvent.mnNotchDelta = aEvent.mnDelta < 0 ? -1 : +1;
- if (aEvent.mnDelta == 0)
- aEvent.mnDelta = aEvent.mnNotchDelta;
- aEvent.mbHorz = false;
- aEvent.mnScrollLines = std::abs(aEvent.mnDelta) / 40;
- if (aEvent.mnScrollLines == 0)
- aEvent.mnScrollLines = 1;
+ break;
+
+ case GDK_SCROLL_UP:
+ aEvent.mnDelta = 120;
+ aEvent.mnNotchDelta = 1;
+ aEvent.mnScrollLines = 3;
+ aEvent.mbHorz = false;
+ pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
+ break;
+
+ case GDK_SCROLL_DOWN:
+ aEvent.mnDelta = -120;
+ aEvent.mnNotchDelta = -1;
+ aEvent.mnScrollLines = 3;
+ aEvent.mbHorz = false;
+ pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
+ break;
+
+ case GDK_SCROLL_LEFT:
+ aEvent.mnDelta = 120;
+ aEvent.mnNotchDelta = 1;
+ aEvent.mnScrollLines = 3;
+ aEvent.mbHorz = true;
+ pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
+ break;
- pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
+ case GDK_SCROLL_RIGHT:
+ aEvent.mnDelta = -120;
+ aEvent.mnNotchDelta = -1;
+ aEvent.mnScrollLines = 3;
+ aEvent.mbHorz = true;
+ pThis->CallCallback(SalEvent::WheelMouse, &aEvent);
+ break;
}
return true;
--
cgit v0.10.2