diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 15:05:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 16:24:11 +0200 |
commit | 7f60978b2ccd0e17816b78bde60c6e0e60a9d52e (patch) | |
tree | feb12ebdf4c2bfd15f08ec170ee18a099e8eb21a /vcl/unx/gtk | |
parent | 5206b0376dcd511843f0e6cb072fe4184adcc487 (diff) |
Related: rhbz#1367846 queue and merge scroll events
Change-Id: Ib45f61bbb35bd240829491ac8a79803222974778
Reviewed-on: https://gerrit.libreoffice.org/37779
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 02e06ae8c053..f32e49ad4f7b 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -2782,8 +2782,9 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer return true; } -gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEventScroll* pEvent, gpointer frame ) +gboolean GtkSalFrame::signalScroll(GtkWidget*, GdkEvent* pInEvent, gpointer frame) { + GdkEventScroll& rEvent = pInEvent->scroll; GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame); static sal_uLong nLines = 0; @@ -2795,16 +2796,16 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEventScroll* pEvent, gpointer nLines = SAL_WHEELMOUSE_EVENT_PAGESCROLL; } - bool bNeg = (pEvent->direction == GDK_SCROLL_DOWN || pEvent->direction == GDK_SCROLL_RIGHT ); + bool bNeg = (rEvent.direction == GDK_SCROLL_DOWN || rEvent.direction == GDK_SCROLL_RIGHT ); SalWheelMouseEvent aEvent; - aEvent.mnTime = pEvent->time; - aEvent.mnX = (sal_uLong)pEvent->x; - aEvent.mnY = (sal_uLong)pEvent->y; + aEvent.mnTime = rEvent.time; + aEvent.mnX = (sal_uLong)rEvent.x; + aEvent.mnY = (sal_uLong)rEvent.y; aEvent.mnDelta = bNeg ? -120 : 120; aEvent.mnNotchDelta = bNeg ? -1 : 1; aEvent.mnScrollLines = nLines; - aEvent.mnCode = GetMouseModCode( pEvent->state ); - aEvent.mbHorz = (pEvent->direction == GDK_SCROLL_LEFT || pEvent->direction == GDK_SCROLL_RIGHT); + aEvent.mnCode = GetMouseModCode( rEvent.state ); + aEvent.mbHorz = (rEvent.direction == GDK_SCROLL_LEFT || rEvent.direction == GDK_SCROLL_RIGHT); if( AllSettings::GetLayoutRTL() ) aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX; |