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

List:       kwin
Subject:    Re: Review Request 109715: Introduce a proper screen property in Toplevel
From:       Martin_Gräßlin <mgraesslin () kde ! org>
Date:       2013-03-27 9:21:27
Message-ID: 20130327092127.22310.51991 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

(Updated March 27, 2013, 10:21 a.m.)


Review request for kwin.


Changes
-------

* disconnect/reconnect signals around move/resize. Direct method call is not a \
                solution - setGeometry is called from too many places
* removed the screen < 0 check as that cannot happen.


Description (updated)
-------

Introduce a proper screen property in Toplevel

Instead of calculating the screen number each time screen() is invoked,
the screen number gets stored in a private member variable and evaluated
whenever either the screen count changes or the Toplevel's geometry
changes. During move/resize the screen property doesn't get updated. The
update is delayed till the end of the move/resize operation.

Testscript:

var clients = workspace.clientList();
for (var i=0; i<clients.length; i++) {
  var client = clients[i];
  client.screenChanged.connect(function () {
    print(client.screen);
  });
}


Diffs (updated)
-----

  kwin/client.cpp ebd043f52a01b5613ef88770855dcdb5fd91a6cc 
  kwin/geometry.cpp a7293ef47fc8ed83c479c7f028c691e19b2c1557 
  kwin/toplevel.h 0cd8d0af4934bad3094b40cdb78e1928342a9310 
  kwin/toplevel.cpp 1d4406c36f2ee6a2bc73892ff741f287c0b2e25a 
  kwin/unmanaged.cpp 8ae58ab2c21b7e1c1eb5db8ded32f2b4049f976c 

Diff: http://git.reviewboard.kde.org/r/109715/diff/


Testing
-------

moved windows around


Thanks,

Martin Gräßlin


[Attachment #5 (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/109715/">http://git.reviewboard.kde.org/r/109715/</a>
  </td>
    </tr>
   </table>
   <br />




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

<div>Review request for kwin.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated March 27, 2013, 10:21 a.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;">* disconnect/reconnect signals around move/resize. Direct method call is \
                not a solution - setGeometry is called from too many places
* removed the screen &lt; 0 check as that cannot happen.</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;">Introduce a proper screen property in Toplevel

Instead of calculating the screen number each time screen() is invoked,
the screen number gets stored in a private member variable and evaluated
whenever either the screen count changes or the Toplevel&#39;s geometry
changes. During move/resize the screen property doesn&#39;t get updated. The
update is delayed till the end of the move/resize operation.

Testscript:

var clients = workspace.clientList();
for (var i=0; i&lt;clients.length; i++) {
  var client = clients[i];
  client.screenChanged.connect(function () {
    print(client.screen);
  });
}</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;">moved windows around</pre>  </td>
 </tr>
</table>




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

 <li>kwin/client.cpp <span style="color: \
grey">(ebd043f52a01b5613ef88770855dcdb5fd91a6cc)</span></li>

 <li>kwin/geometry.cpp <span style="color: \
grey">(a7293ef47fc8ed83c479c7f028c691e19b2c1557)</span></li>

 <li>kwin/toplevel.h <span style="color: \
grey">(0cd8d0af4934bad3094b40cdb78e1928342a9310)</span></li>

 <li>kwin/toplevel.cpp <span style="color: \
grey">(1d4406c36f2ee6a2bc73892ff741f287c0b2e25a)</span></li>

 <li>kwin/unmanaged.cpp <span style="color: \
grey">(8ae58ab2c21b7e1c1eb5db8ded32f2b4049f976c)</span></li>

</ul>

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







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




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



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


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

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