Review Request: Fix Konqueror's MMB click to close tab option
Dawit Alemayehu
adawit at kde.org
Sat Sep 29 17:31:34 BST 2012
> On Sept. 29, 2012, 6:48 a.m., David Faure wrote:
> > Doesn't this break "moving a tab with MMB" then? The KTabBar mousePress/mouseRelease code won't be called anymore.
> >
> > If this is the case, then what we really have is two incompatible features... so we could just remove the "moving with MMB" code in ktabbar and this eventFilter wouldn't be needed.
Why remove a feature other application might want to have or was the "moving a tab with MMB" specifically added for Konqueror's sake ? Anyhow, this patch does not really break "moving a tab with MMB" unless the user checks the "Middle-click on a tab to close it" option. Otherwise, the MMB click on a tab will continue to behave as it does now.
- Dawit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106615/#review19560
-----------------------------------------------------------
On Sept. 27, 2012, 6:11 p.m., Dawit Alemayehu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106615/
> -----------------------------------------------------------
>
> (Updated Sept. 27, 2012, 6:11 p.m.)
>
>
> Review request for KDE Base Apps and David Faure.
>
>
> Description
> -------
>
> The attached patch fixes the bug where clicking on a tab with the MMB while the "Middle-click on a tab to close it" option is checked results in the tab gaining the focus first before being closed instead of being closed in the background. That results in the active tab being changed when a user activates the aforementioned option and clicks on a background tab with the MMB.
>
> For the record the reason why this really happens is KTabBar's treatment of the MMB clicks when the setMovable is set to TRUE. In addition to emitting a mouseMiddleClick signal which Konqueror currently relies on to close the tab, it also eats the MMB click event and generates a new LMB click event in its place. Apparently that was done for compatibility sake so that the user can move tabs using either the LMB or MMB.
>
> Anyhow, this patch addresses the problem by installing an event filter to intercept the mouse events from the tabbar and handle MMB clicks on its own when the aforementioned option is checked so that we do not receive unnecessary bogus events.
>
>
> This addresses bug 264058.
> http://bugs.kde.org/show_bug.cgi?id=264058
>
>
> Diffs
> -----
>
> konqueror/src/konqtabs.h 4b6f1f1
> konqueror/src/konqtabs.cpp 611659f
>
> Diff: http://git.reviewboard.kde.org/r/106615/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dawit Alemayehu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120929/faf869e5/attachment.htm>
More information about the kde-core-devel
mailing list