Bug 239070 - Scrolling with multitouch trackpad does not work
Summary: Scrolling with multitouch trackpad does not work
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: MacPorts macOS
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 23:50 UTC by Jan Gosmann
Modified: 2010-10-21 05:06 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Gosmann 2010-05-27 23:50:06 UTC
Version:           unspecified (using KDE 4.4.3) 
OS:                OS X

I am not able to scroll in Kate using two fingers on my multitouch trackpad of my unibody Macbook Pro. The scroll wheel of mouses work without any problems.

Also there is no problem with scrolling in Qt applications.

This bug also existed in KDE 4.4.2, but I'm not sure in which version it occurred first. (But in some older versions it worked even if it was not very smooth because the text was always moved by three lines per step instantly.)

Reproducible: Always

Steps to Reproduce:
Start Kate (or any editor using the kate component).
Enter enough lines to make the scroll bar appear.
Try to scroll using two finger on the trackpad of a Macbook Pro.

Actual Results:  
The text is not scrolled.

Expected Results:  
The text should scroll.

I am using Mac OS X 10.6.3 (Snow Leopard) on an unibody Macbook Pro from late 2008 (5th generation)
Comment 1 Bernhard Beschow 2010-05-28 00:25:09 UTC
Works here on Linux, both vertical and horizontally. Tested on two different machines.
Comment 2 Pedro 2010-06-01 12:34:36 UTC
I have the same problem. Scrolling using the trackpad is not working properly in kate, kile, kwrite. 
Increasing the scrolling speed in the mac system settings makes scrolling possible, but it is anything from smooth. Note that there are no problems in other KDE applications like kconsole, and there are also no problems if I use the mouse wheel from an external mouse. 

OS: OSX Snow Leopard 10.6.3
System: Macbook Pro, late 2008 (same as above it seems)
KDE version: 4.4.2 installed using macports
Comment 3 Kirit Sælensminde 2010-08-17 17:52:52 UTC
I have the same problem on my MacBookPro, with the version installed via fink.

The scrolling works horizontally, but not vertically.
Comment 4 Kirit Sælensminde 2010-08-17 17:53:25 UTC
I have the same problem on my MacBookPro, with the version installed via fink.

The scrolling works horizontally, but not vertically.
Comment 5 Pascal Létourneau 2010-08-21 22:05:51 UTC
SVN commit 1166438 by pletourn:

Let's see if that help

CCBUG:239070


 M  +3 -0      kateviewhelpers.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1166438
Comment 6 Andrius 2010-08-22 04:40:34 UTC
the opposite happens on Windows, vertical works, horizontal doesn't (single finger on bottom of touchpad, or double finger), not sure if this is the same bug or if I should file a separated one.
Comment 7 Jan Gosmann 2010-08-22 13:06:59 UTC
Thanks for the patch! I was already planning to see whether I am able to fix this myself.

I am traveling for the next 6 weeks and will not be able to verify whether the patch works. But I will to so when I am back home in October.
Comment 8 Jan Gosmann 2010-10-17 16:52:45 UTC
Finally I had some time to test the patch. However, it does not fix the problem.

Moreover I noticed when trying to scroll using two finger while the cursor is positioned above the scroll bar the scroll bar will be moved, but without scrolling the text area. This behavior is the same with and without the patch. When the cursor is positioned above the text area neither that nor the scroll bar moves.
Comment 9 Pascal Létourneau 2010-10-17 20:26:26 UTC
What about this patch?

Index: view/kateviewinternal.cpp
===================================================================
--- view/kateviewinternal.cpp   (revision 1186827)
+++ view/kateviewinternal.cpp   (working copy)
@@ -3173,7 +3173,7 @@ void KateViewInternal::wheelEvent(QWheel
       else
         scrollNextPage();
     } else {
-      scrollViewLines(-((e->delta() / 120) * QApplication::wheelScrollLines()));
+      QApplication::sendEvent(m_lineScroll, e);
     }

   } else if (columnScrollingPossible()) {
Comment 10 Jan Gosmann 2010-10-18 19:29:03 UTC
With this patch the scroll bar moves also when the cursor is positioned about the text area when using the trackpad to scroll (which wasn't the case without the patch). But the text itself does not move.
Comment 11 Pascal Létourneau 2010-10-18 21:13:39 UTC
This patch is in 4.5 but you're using 4.4, right?

Index: view/kateviewinternal.cpp
===================================================================
--- view/kateviewinternal.cpp   (revision 1132544)
+++ view/kateviewinternal.cpp   (revision 1132545)
@@ -147,6 +147,7 @@ KateViewInternal::KateViewInternal(KateV
   connect(m_lineScroll, SIGNAL(actionTriggered(int)), SLOT(scrollAction(int)));
   connect(m_lineScroll, SIGNAL(sliderMoved(int)), SLOT(scrollLines(int)));
   connect(m_lineScroll, SIGNAL(sliderMMBMoved(int)), SLOT(scrollLines(int)));
+  connect(m_lineScroll, SIGNAL(valueChanged(int)), SLOT(scrollLines(int)));

   // catch wheel events, completing the hijack
   //m_lineScroll->installEventFilter(this);
Comment 12 Jan Gosmann 2010-10-18 21:36:10 UTC
Yes, I am using 4.4.5, because the Macports port is still that version.
Comment 13 Pascal Létourneau 2010-10-18 21:39:43 UTC
What the last patch does for you?
Comment 14 Jan Gosmann 2010-10-18 21:43:57 UTC
I have not tested it, yet. I suppose, I will do it tomorrow.
Comment 15 Jan Gosmann 2010-10-19 21:20:23 UTC
Great news: Using the last two patches the scrolling works!

To prevent misunderstandings, I used the following to patches for KDE 4.4.5. Therefore the later one should already be included in KDE 4.5.

Index: view/kateviewinternal.cpp
===================================================================
--- view/kateviewinternal.cpp   (revision 1186827)
+++ view/kateviewinternal.cpp   (working copy)
@@ -3173,7 +3173,7 @@ void KateViewInternal::wheelEvent(QWheel
       else
         scrollNextPage();
     } else {
-      scrollViewLines(-((e->delta() / 120) *
QApplication::wheelScrollLines()));
+      QApplication::sendEvent(m_lineScroll, e);
     }

   } else if (columnScrollingPossible()) {

Index: view/kateviewinternal.cpp
===================================================================
--- view/kateviewinternal.cpp   (revision 1132544)
+++ view/kateviewinternal.cpp   (revision 1132545)
@@ -147,6 +147,7 @@ KateViewInternal::KateViewInternal(KateV
   connect(m_lineScroll, SIGNAL(actionTriggered(int)),
SLOT(scrollAction(int)));
   connect(m_lineScroll, SIGNAL(sliderMoved(int)), SLOT(scrollLines(int)));
   connect(m_lineScroll, SIGNAL(sliderMMBMoved(int)), SLOT(scrollLines(int)));
+  connect(m_lineScroll, SIGNAL(valueChanged(int)), SLOT(scrollLines(int)));

   // catch wheel events, completing the hijack
   //m_lineScroll->installEventFilter(this);

Thanks for all the help! :)
Comment 16 Pascal Létourneau 2010-10-21 05:04:12 UTC
SVN commit 1188021 by pletourn:

Let QScrollBar take care of the wheel event

BUG:239070


 M  +1 -1      kateviewinternal.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1188021
Comment 17 Pascal Létourneau 2010-10-21 05:06:10 UTC
SVN commit 1188022 by pletourn:

Let QScrollBar take care of the wheel event

BUG:239070


 M  +1 -1      kateviewinternal.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1188022