Review Request: Prevent activation of tabs opened in the background
Dawit Alemayehu
adawit at kde.org
Fri Oct 26 09:30:23 BST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107048/
-----------------------------------------------------------
Review request for KDE Base Apps and David Faure.
Description
-------
The attached patch is an attempt to address a rather difficult problem where attempting to open certain types of document in a background tab (MMB or CTRL+LMB) results in the activation of the part in that background tab.
The bug can be reproduced by simply attempting to open a PDF document using either the MMB or the CTRL+LMB button in Konqueror. If you have a local PDF file simply navigate to the location of the file and click on the file using the MMB. Otherwise, see the aforementioned bug report for a website link with PDF links in it. If the "Open new tabs in background" open is checked when you clicked on the PDF document, then the PDF document is opened embedded into a Konqueror tab. This background tab is then activated which causes it to obtain the focus when it should not. The consequence of the unintended activation of the background tab is the location bar changes its URL to the URL of the part in the background tab and the GUI is modified to reflect the contents of the part in the background tab.
All of that happens because the Okular part propagates the FocusIn event which is caught by KParts::Manager::eventFilter. It in turn invokes the virtual KParts::PartManager::setActivePart function which causes the unintended activation. This patch addressed the problem by ignoring any requests to active the tab so long as the reason for the activation is Qt::OtherFocusReason.
This addresses bug 306417.
http://bugs.kde.org/show_bug.cgi?id=306417
Diffs
-----
konqueror/src/konqviewmanager.cpp c8e3cb0
Diff: http://git.reviewboard.kde.org/r/107048/diff/
Testing
-------
- Tested opening a PDF file when the "Open new tabs in background" option is checked.
- Tested opening a PDF file when the "Open new tabs in background" option is UNchecked.
- Tested opening a PDF link from a webpage using both the MMB and CTRL+LMB.
Thanks,
Dawit Alemayehu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20121026/fa789f79/attachment.htm>
More information about the kde-core-devel
mailing list