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





<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDE Frameworks, kwin and Plasma.</div>
<div>By Martin Gräßlin.</div>










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


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </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;">KStartupInfo::createNewStartupId is supposed to return a new
id with a properly setup user timestamp. But if QX11Info::appUserTime
returns 0 this was included in the id and cannot be considered a
properly setup user timestamp. An app user time of 0 is the case
for klauncher. If an application uses this timestamp of 0 passed from
the startup notification it causes problems with passing focus to it
from KWin. The application sets the timestamp in the
_NET_WM_USER_TIME property and the value "0" has the special meaning
of requesting to not be initially mapped. KWin honors that and doesn't
focus the window. An application is not supposed to interpret a 0 time
stamp passed through the startup notification as a special value to get
the current time. It is totally fine to expect that it gets a proper
value passed. Thus one cannot blame applications for not interpreting
this value accordingly. An example for an application passing the 0
to the _NET_WM_USER_TIME is Firefox. Starting Firefox in a Plasma 5
session through e.g. the launcher results in KWin not passing focus
to it and instead demands attention. This is clearly wrong and not
intended.

The solution in this change is to get the current timestamp from
the X server in case the appUserTime is 0. This fixes the described
problem with Firefox: it now gets properly focused on starting
through a launcher.</pre>
  </td>
 </tr>
</table>



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

 <li>autotests/kstartupinfo_unittest.cpp <span style="color: grey">(f4b607d2a21da7dcf32434c00b2bdeeaf401ee65)</span></li>

 <li>src/kstartupinfo.cpp <span style="color: grey">(03418fce1a154ea388d0f65665dc0c9724a5623a)</span></li>

</ul>

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






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




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