<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/101943/">http://git.reviewboard.kde.org/r/101943/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 13th, 2011, 12:54 p.m., <b>Aaron J. Seigo</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">&quot;I disabled it for Plasma active, but that may not be appropriate.&quot;

we still need screen locking in Active, so this probably isn&#39;t entirely correct. what we probably want, however, is a replacement for the actual lock process which isn&#39;t appropriate for Active. right now we have a QML based thing that doesn&#39;t use passwords, and it would be very nice to use that as a full screen app in replacement of the desktop-appropriate lock app. this would also neatly remove the desktopy screen savers from Active, and that&#39;s just fine.

in the patch i don&#39;t see where the lock process file get added to.. just lots and lots of code removals :) i assume this was a problem with the post-review script or some such and that you used `git mv` to move the files somewhere appropriate. i actulaly think the lock process should sit in the top level of kde-workspace, not hidden under whatever app launches it. and then we can provide both a password-based one for the desktop in there as well as a touch focused one; perhaps as build options, even.

one other thing that probably needs to be done: the screensaver/lock window should be identifitied as such to the window manager, just as we now do with the desktop&#39;s Dashboard windows. dasbhoard marking is done with a simple:


#ifdef Q_WS_X11
    XClassHint classHint;
    classHint.res_name = DASHBOARD_WIN_NAME;
    classHint.res_class = DASHBOARD_WIN_CLASS;
    XSetClassHint(QX11Info::display(), windowId, &amp;classHint);
#endif

the name and class are defined in the file as simply &quot;dashboard&quot;. we could do the same with the lock window and then when it is showing KWin can do clever things like not paint any other windows.

i like this patch so far, however, other than a few comments that follow inline. Martin also needs to comment on it, of course.</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, I moved the lock process to the kwin directory using git mv... clearly git diff didn&#39;t show it up properly.  I can move it up to the top directory, maybe as &quot;kscreenlocker&quot;, since that&#39;s the name of the executable.

The window hinting is a good idea, but should probably go in as a separate patch.

I&#39;ll upload a new version addressing the points below this evening.</pre>
<br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 13th, 2011, 12:54 p.m., <b>Aaron J. Seigo</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101943/diff/1/?file=26943#file26943line132" style="color: black; font-weight: bold; text-decoration: underline;">kwin/workspace.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">Workspace::Workspace(bool restore)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">132</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#ifdef KWIN_BUILD_SCREENSAVER</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">133</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="p">,</span> <span class="n">saver_engine</span><span class="p">()</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">134</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#endif</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this is reduendant to line 236 and doesn&#39;t provide any useful initialization. the new should either be moved here, this line have a 0 added to it, or be removed.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Oh, that was supposed to have a 0 in it, in keeping with the other initializers in that class.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 13th, 2011, 12:54 p.m., <b>Aaron J. Seigo</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101943/diff/1/?file=26943#file26943line236" style="color: black; font-weight: bold; text-decoration: underline;">kwin/workspace.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">Workspace::Workspace(bool restore)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">236</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">saver_engine</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SaverEngine</span><span class="p">();</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">should check KWIN_BUILD_SCREENSAVER?</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 13th, 2011, 12:54 p.m., <b>Aaron J. Seigo</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101943/diff/1/?file=26943#file26943line516" style="color: black; font-weight: bold; text-decoration: underline;">kwin/workspace.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">Workspace::~Workspace()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">516</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">delete</span> <span class="n">saver_engine</span><span class="p">;</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">should check KWIN_BUILD_SCREENSAVER?</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes.</pre>
<br />




<p>- Alex</p>


<br />
<p>On July 13th, 2011, 11:28 a.m., Alex Merry wrote:</p>






<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 kwin, Plasma, Aaron J. Seigo, and Martin Gräßlin.</div>
<div>By Alex Merry.</div>


<p style="color: grey;"><i>Updated July 13, 2011, 11:28 a.m.</i></p>




<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;">This transfers the screen locking and screensaver funcitonality wholesale from krunner to kwin.  This has been OK&#39;d in principle by the relevant maintainers.

Most of the code is simply moved untouched.  Points of note:

I&#39;ve introduced a KWIN_BUILD_SCREENSAVER option, to match the other kwin build options, like KWIN_BUILD_TABBOX.  I disabled it for Plasma active, but that may not be appropriate.

I put the screensaver stuff (creating the SaverEngine object and setting up the shortcut) in KWin::Workspace.  The shortcut stuff is actually in useractions.cpp, but this implements methods in KWin::Workspace.

I&#39;m using the kglobalaccel D-Bus interface directly to steal the existing shortcut from KRunner.  I&#39;m doing it like this because the KAction/KGlobalAccel interface is not rich enough to do this (probably wisely - this isn&#39;t something apps should generally be doing).  The shortcut deregistration happens in KWin rather than KRunner because I don&#39;t want to rely on the order in which KWin and KRunner are started (or even on KRunner being started at all).</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;">Allowing the screensaver to activate (both terminating the screensaver before it locks and after, with lock after 60 seconds set).

Using the lock screen action from krunner.

Stealing a non-default shortcut from KRunner (set the krunner Lock Session shortcut to another sequence, and ran KWin; KWin successfully deregistered krunner&#39;s Lock Session shortcut and assigned the key sequence to its own Lock Session shortcut).

Running KWin when no existing Lock Session shortcuts had been defined (either for krunner or kwin).  KWin successfully registered its Lock Session shortcut with the default key sequence (this is what would happen with a fresh user account).</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>kcontrol/screensaver/CMakeLists.txt <span style="color: grey">(e4dcc3a)</span></li>

 <li>krunner/CMakeLists.txt <span style="color: grey">(4455847)</span></li>

 <li>krunner/README <span style="color: grey">(c8b9740)</span></li>

 <li>krunner/config-xautolock.h.cmake <span style="color: grey">(eadb0a6)</span></li>

 <li>krunner/dbus/org.freedesktop.ScreenSaver.xml <span style="color: grey">(5efd943)</span></li>

 <li>krunner/dbus/org.kde.screensaver.xml <span style="color: grey">(e700b88)</span></li>

 <li>krunner/kcfg/kscreensaversettings.kcfg <span style="color: grey">(c8f76f3)</span></li>

 <li>krunner/kcfg/kscreensaversettings.kcfgc <span style="color: grey">(af9133d)</span></li>

 <li>krunner/krunnerapp.h <span style="color: grey">(82db725)</span></li>

 <li>krunner/krunnerapp.cpp <span style="color: grey">(c143be5)</span></li>

 <li>krunner/lock/CMakeLists.txt <span style="color: grey">(cf9a67e)</span></li>

 <li>krunner/lock/autologout.h <span style="color: grey">(0c44405)</span></li>

 <li>krunner/lock/autologout.cc <span style="color: grey">(c86e29a)</span></li>

 <li>krunner/lock/config-krunner-lock.h.cmake <span style="color: grey">(7bfdfd6)</span></li>

 <li>krunner/lock/kscreenlocker.notifyrc <span style="color: grey">(2955c5f)</span></li>

 <li>krunner/lock/lockdlg.h <span style="color: grey">(f25e55f)</span></li>

 <li>krunner/lock/lockdlg.cc <span style="color: grey">(6367216)</span></li>

 <li>krunner/lock/lockprocess.h <span style="color: grey">(8b6d9a8)</span></li>

 <li>krunner/lock/lockprocess.cc <span style="color: grey">(ecc632f)</span></li>

 <li>krunner/lock/main.h <span style="color: grey">(8a60353)</span></li>

 <li>krunner/lock/main.cc <span style="color: grey">(9f1c9b8)</span></li>

 <li>krunner/main.cpp <span style="color: grey">(84a547b)</span></li>

 <li>krunner/screensaver/saverengine.h <span style="color: grey">(3384d4a)</span></li>

 <li>krunner/screensaver/saverengine.cpp <span style="color: grey">(6c15be6)</span></li>

 <li>krunner/screensaver/xautolock.h <span style="color: grey">(3db3233)</span></li>

 <li>krunner/screensaver/xautolock.cpp <span style="color: grey">(7124215)</span></li>

 <li>krunner/screensaver/xautolock_c.h <span style="color: grey">(3b82f5c)</span></li>

 <li>krunner/screensaver/xautolock_diy.c <span style="color: grey">(b9df2f8)</span></li>

 <li>krunner/screensaver/xautolock_engine.c <span style="color: grey">(d6d0cf5)</span></li>

 <li>kwin/CMakeLists.txt <span style="color: grey">(7d6ea52)</span></li>

 <li>kwin/config-kwin.h.cmake <span style="color: grey">(a291859)</span></li>

 <li>kwin/useractions.cpp <span style="color: grey">(387e499)</span></li>

 <li>kwin/workspace.h <span style="color: grey">(66b9830)</span></li>

 <li>kwin/workspace.cpp <span style="color: grey">(8cf5299)</span></li>

 <li>plasma/desktop/applets/kickoff/CMakeLists.txt <span style="color: grey">(bc5fa2e)</span></li>

 <li>plasma/generic/applets/lock_logout/CMakeLists.txt <span style="color: grey">(8381d46)</span></li>

 <li>plasma/generic/containmentactions/contextmenu/CMakeLists.txt <span style="color: grey">(a1fc205)</span></li>

 <li>plasma/generic/runners/sessions/CMakeLists.txt <span style="color: grey">(1b8292c)</span></li>

 <li>powerdevil/daemon/CMakeLists.txt <span style="color: grey">(bad3dae)</span></li>

</ul>

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




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








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