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

Review request for kwin.
By Martin Gräßlin.

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

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);
  });
}

Testing

moved windows around

Diffs (updated)

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

View Diff