Summary: | ktabbar does not change page on wheel events | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | David Palacio <dpalacio> |
Component: | kdeui | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | apaku, faure, frank78ac, peter.penz19, robertknight |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | move behaviour to KTabBar |
Thanks for the patch. You might want to file a review request at http://reviewboard.kde.org/ - patches get overlooked quite easily here at bugs.kde.org. I don't know why it was done this way indeed. SVN history points to r309732 by binner, implementing bug 77946. The problem with changing this now, is that it would break applications that expect KTabBar to emit wheelDelta rather than changing pages all by itself. LXR says: http://lxr.kde.org/source/extragear/sdk/kdevplatform-git/sublime/container.cpp#181 http://lxr.kde.org/source/KDE/kdebase/apps/konsole/src/ViewContainer.cpp#472 http://lxr.kde.org/source/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.cpp#1244 Well, all three of them of course do something like changing pages, but in different ways, so I wonder if they have special requirements. Adding apaku (for kdevelop), Peter (for dolphin) and Robert Knight (for konsole) to the CC. Guys? Would it create a problem for you if KTabBar handled mouse wheel events and you could delete your wheelDelta-connected slot? From a Dolphin point of view I'd be glad to remove the custom handling of the wheel for tabs from dolphinmainwindow. See http://reviewboard.kde.org/r/5184/ for discussion on the proposed solutions. Argh it would have been nice to link the reviewboard url to this bug upfront, I wouldn't have spent time doing the same investigation :( SVN commit 1171318 by davidp: Move tab switching by mouse wheel scrolling from KTabWidget to KTabBar. Skip disabled pages. BUG: 248617 BUG: 248962 M +24 -3 ktabbar.cpp M +2 -8 ktabwidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1171318 SVN commit 1171577 by ppenz: Remove custom handling of wheel-events for tabs, this is done now in KTabBar CCBUG: 248962 M +0 -11 dolphinmainwindow.cpp M +0 -3 dolphinmainwindow.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1171577 |
Created attachment 50919 [details] move behaviour to KTabBar Version: SVN (using Devel) OS: Linux For some reason KTabBar does not change page itself but sends a signal that KTabWidget use to change the page instead. A problem arises when programs do use KTabBar directly instead of KTabWidget (e.g. the web browser Rekonq). Such programs do not switch tabs when the mouse wheel is scrolled over them. The attached patch solves this problem. The proposed solution moves the behaviour implementation from KTabWidget to KTabBar, disables and disconnects the relevant signal in KTabBar/KTabWidget. Reproducible: Didn't try With the patch applied, Konqueror, Konsole and Rekonq all work as expected with regard to tabs. Note that QTabBar in Qt already implements this with a small difference: it does not wrap around the extreme tabs. That is, it will not go from the last to the first tab and viceversa.