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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 15th, 2016, 8:42 a.m. CET, <b>Martin Gräßlin</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="https://git.reviewboard.kde.org/r/126291/diff/2/?file=444312#file444312line89" style="color: black; font-weight: bold; text-decoration: underline;">src/platforms/osx/kwindowsystem_macobjc.mm</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <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">89</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#ifdef QT_MAC_USE_COCOA</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Why is the define needed? Doesn't it make more sense to just not build the OSX backend if COCOA is disabled?</p></pre>
 </blockquote>



 <p>On February 15th, 2016, 12:06 p.m. CET, <b>René J.V. Bertin</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">That would require knowing the answer to that question in the CMake file; I'd have to look into that. Is it trivial to do the equivalent of an <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">#ifdef TOKEN</code> in a CMake file?</p></pre>
 </blockquote>





 <p>On February 15th, 2016, 1:59 p.m. CET, <b>Martin Gräßlin</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">That should be defined in the cmake config for Qt5Gui. At least where I needed similar things in the past it was defined.</p></pre>
 </blockquote>





 <p>On February 17th, 2016, 12:23 a.m. CET, <b>René J.V. Bertin</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I cannot find any variable/flag that indicates against what SDK Qt has been built, sadly.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Still impossible to determine this from the information provided with Qt 5.6.1 . I think the likelihood that QT_MAC_USE_COCOA is ever not set is extremely small nowadays, so if you want I can just drop the check completely.</p></pre>
<br />




<p>- René J.V.</p>


<br />
<p>On March 4th, 2016, 8:19 p.m. CET, René J.V. Bertin wrote:</p>








<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 Software on Mac OS X and KDE Frameworks.</div>
<div>By René J.V. Bertin.</div>


<p style="color: grey;"><i>Updated March 4, 2016, 8:19 p.m.</i></p>









<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">KWindowSystem has been lacking a platform plugin for OS X. This RR presents a "backport" of the modified KDE4 KWindowSystem implementation that has been used in the MacPorts kdelibs4 port for the last 2 or 3 (or more) years.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have made some initial steps to remove deprecated Carbon API calls, but this is clearly a work in progress.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Open questions include
- is there any justification to run an event handler (or Cocoa observer) to keep track of running applications, possibly even listing all their open windows?
- is there any use for the Qt event listener framework (cf. the NETEventFilter in the X11 plugin)? I haven't yet had time to try to figure out what this "could be good for", and am very open to suggestions in this departments.
- one application for such an event filter would be a listener that catches the opening and closing of all windows by the running process, and keeps track of their <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">WId</code>s. A new method could then be added (to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KWindowInfo</code>?) to distinguish <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">WId</code>s created by the running application from "foreign" ones (useful also on Wayland and MS Windows).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KWindowSystem::setMainWindow</code> should become a front for payload provided by the plugins. I'll leave that to the regular/official maintainer(s) of this framework.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This code could probably do with <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">lots</em> of comments; I'll try to add them as questions about this or that bit of code arise.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On OS X 10.9.5 with Qt 5.5.1 and frameworks 5.16.0 .</p></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/CMakeLists.txt <span style="color: grey">(65ed8d4)</span></li>

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

 <li>src/debug_p.h <span style="color: grey">(5ef8996)</span></li>

 <li>src/debug_p.cpp <span style="color: grey">(72abfb7)</span></li>

 <li>src/kwindowsystem.cpp <span style="color: grey">(407a67d)</span></li>

 <li>src/platforms/osx/CMakeLists.txt <span style="color: grey">(4fc3347)</span></li>

 <li>src/platforms/osx/cocoa.json <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/platforms/osx/kkeyserver.cpp <span style="color: grey">(3ddb921)</span></li>

 <li>src/platforms/osx/kwindowinfo.cpp <span style="color: grey">(e8555bb)</span></li>

 <li>src/platforms/osx/kwindowinfo.mm <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/platforms/osx/kwindowinfo_mac_p.h <span style="color: grey">(c8f307e)</span></li>

 <li>src/platforms/osx/kwindowinfo_p_cocoa.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/platforms/osx/kwindowsystem.cpp <span style="color: grey">(1758829)</span></li>

 <li>src/platforms/osx/kwindowsystem_mac_p.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/platforms/osx/kwindowsystem_macobjc.mm <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/platforms/osx/kwindowsystem_p_cocoa.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/platforms/osx/plugin.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/platforms/osx/plugin.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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






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







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