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

Martin Koller kollix at aon.at
Sat Aug 22 23:37:19 BST 2009


Hi,

The bug https://bugs.kde.org/show_bug.cgi?id=184273
mentions that KHTMLView will not stop auto scrolling when one presses key 
up/down.
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: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20090823/596da0ea/attachment.sig>


More information about the kfm-devel mailing list