Bug 158166 - Unexpected bottom tabbar scrolling with close button disabled
Summary: Unexpected bottom tabbar scrolling with close button disabled
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-21 15:33 UTC by Ilya Konkov
Modified: 2008-08-26 02:36 UTC (History)
1 user (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 Ilya Konkov 2008-02-21 15:33:45 UTC
Version:            (using KDE 4.0.1)
Installed from:    Compiled From Sources
OS:                Linux

Bug appears when using this options in konquerorrc:
[FMSettings]
TabPosition=Bottom
CloseTabButton=false

Both options are necessary.
Open >=2 pages, scroll page down to the end by mouse wheel and konqueror will switch tab to the next one. 
The page must have vertical scrollbar.
Comment 1 Val L. 2008-02-21 15:38:11 UTC
I can confirm this (KDE 4.0.1, 20080201).
Comment 2 Ilya Konkov 2008-02-21 23:08:16 UTC
Bug appears, because there is no check that scrollbars are already at end of range. As a result event will be send to KonqFrameTabs with pos() for viewport widget which can be pretty large (ie 800x2000)
But isEmptyTabbarSpace() doesn't expect such event->pos() and fails checks.

One of this two fixes resolves issue:

Index: khtml/khtmlview.cpp
===================================================================
--- khtml/khtmlview.cpp (revision 777881)
+++ khtml/khtmlview.cpp (working copy)
@@ -3667,7 +3667,7 @@
             killTimer(d->scrollingFromWheelTimerId);
         d->scrollingFromWheelTimerId = startTimer(400);

-        if (m_part->parentPart()) {
+        if (m_part->parentPart() || parent()) {
             // don't propagate if we are a sub-frame and our scrollbars are already at end of range
             bool h = (static_cast<QWheelEvent*>(e)->orientation() == Qt::Horizontal);
             bool d = (static_cast<QWheelEvent*>(e)->delta() < 0);
Index: kdeui/widgets/ktabwidget.cpp
===================================================================
--- kdeui/widgets/ktabwidget.cpp        (revision 777881)
+++ kdeui/widgets/ktabwidget.cpp        (working copy)
@@ -348,7 +348,7 @@
   if ( event->orientation() == Qt::Horizontal )
     return;

-  if ( d->isEmptyTabbarSpace( event->pos() ) )
+  if ( d->isEmptyTabbarSpace( mapFromGlobal( event->globalPos() ) ) )
     wheelDelta( event->delta() );
   else
     event->ignore();
Comment 3 Dario Andres 2008-08-26 01:56:14 UTC
Can you still reproduce the bug with a recent KDE version? . Isn't it fixed with the patches described in comment 2 ?
Comment 4 Ilya Konkov 2008-08-26 02:36:45 UTC
I can't reproduce the bug anymore with current svn version. I guess it can be closed now.