[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request: Prevent activation of tabs opened in the background
From:       "Dawit Alemayehu" <adawit () kde ! org>
Date:       2012-10-30 19:49:39
Message-ID: 20121030194939.17644.25185 () vidsolbach ! de
[Download RAW message or body]

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107048/
-----------------------------------------------------------

(Updated Oct. 30, 2012, 7:49 p.m.)


Review request for KDE Base Apps and David Faure.


Changes
-------

Updated description.


Description (updated)
-------

The attached patch is an attempt to fix the bug where opening certain types of \
documents in a background tab results in the new tab being activated inadvertently.

The issue 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 it using the MMB. Otherwise, see \
the aforementioned bug report for a site with PDF links in it. If the "Open new tabs \
in background" option is checked when you clicked on the PDF document, then the PDF \
document is opened embedded in Konqueror tab in the background. However, this \
background tab should not be activated when the aforementioned option is enabled. 

Unfortunately, in the currently implementation the background tab will get activated \
if the part used to handle the resource (PDF file in this case) issues a FocusIn \
event, for example by calling setFocus. That is because KPart::PartManager installs \
an event filter on all the KParts it manages, listens for FocusIn events, and invokes \
KParts::PartManager::setActivatePart.


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


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/107048/">http://git.reviewboard.kde.org/r/107048/</a>
  </td>
    </tr>
   </table>
   <br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for KDE Base Apps and David Faure.</div>
<div>By Dawit Alemayehu.</div>


<p style="color: grey;"><i>Updated Oct. 30, 2012, 7:49 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Updated description.</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description  \
(updated)</h1>  <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">The attached patch is an attempt to fix the bug where opening certain \
types of documents in a background tab results in the new tab being activated \
inadvertently.

The issue 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 it using the MMB. Otherwise, see \
the aforementioned bug report for a site with PDF links in it. If the &quot;Open new \
tabs in background&quot; option is checked when you clicked on the PDF document, then \
the PDF document is opened embedded in Konqueror tab in the background. However, this \
background tab should not be activated when the aforementioned option is enabled. 

Unfortunately, in the currently implementation the background tab will get activated \
if the part used to handle the resource (PDF file in this case) issues a FocusIn \
event, for example by calling setFocus. That is because KPart::PartManager installs \
an event filter on all the KParts it manages, listens for FocusIn events, and invokes \
KParts::PartManager::setActivatePart.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">- Tested opening a PDF file when the &quot;Open new tabs in \
                background&quot; option is checked.
- Tested opening a PDF file when the &quot;Open new tabs in background&quot; option \
                is UNchecked.
- Tested opening a PDF link from a webpage using both the MMB and CTRL+LMB.</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=306417">306417</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>konqueror/src/konqviewmanager.cpp <span style="color: \
grey">(c8e3cb0)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/107048/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>




  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic