[mini-patch] make KHTMLView scrolling stop when moving view via API

Martin Koller kollix at aon.at
Fri Aug 28 22:07:25 BST 2009

Obviously kfm-devel was the wrong list to ask. So here I go again:


The bug https://bugs.kde.org/show_bug.cgi?id=184273
mentions that KHTMLView will not stop auto scrolling when one presses key 
This is due to the fact the KHTMLView does not stop it's internal timer when
one calls its scrollBy() Method, which is what kmail does.

I suggest the following patch.
Is this ok for commit ?

Index: khtmlview.cpp
--- khtmlview.cpp       (Revision 1013649)
+++ khtmlview.cpp       (Arbeitskopie)
@@ -746,6 +746,8 @@

 void KHTMLView::scrollBy(int x, int y)
+   if (d->scrollTimerId)
+       d->newScrollTimer(this, 0);
    horizontalScrollBar()->setValue( horizontalScrollBar()->value()+x );
    verticalScrollBar()->setValue( verticalScrollBar()->value()+y );

Best regards/Schöne Grüße

Martin    ()  ascii ribbon campaign - against html mail 
          /\                        - against microsoft attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090828/97164d74/attachment.sig>

More information about the kde-core-devel mailing list