Tiled: call World.do only if condition satisfied
This commit is contained in:
@@ -98,19 +98,19 @@ namespace ClientState {
|
|||||||
const newCenterY = newGeometry.y + newGeometry.height/2;
|
const newCenterY = newGeometry.y + newGeometry.height/2;
|
||||||
const dx = Math.round(newCenterX - oldCenterX);
|
const dx = Math.round(newCenterX - oldCenterX);
|
||||||
const dy = Math.round(newCenterY - oldCenterY);
|
const dy = Math.round(newCenterY - oldCenterY);
|
||||||
client.moveTransients(dx, dy);
|
if (dx !== 0 || dy !== 0) {
|
||||||
|
client.moveTransients(dx, dy);
|
||||||
|
}
|
||||||
|
|
||||||
world.do((clientManager, desktopManager) => {
|
if (kwinClient.resize) {
|
||||||
if (kwinClient.resize) {
|
world.do(() => window.onUserResize(oldGeometry, !cursorChangedAfterResizeStart));
|
||||||
window.onUserResize(oldGeometry, !cursorChangedAfterResizeStart);
|
} else if (
|
||||||
} else if (
|
!client.isManipulatingGeometry() &&
|
||||||
!client.isManipulatingGeometry() &&
|
!Clients.isMaximizedGeometry(kwinClient) &&
|
||||||
!Clients.isMaximizedGeometry(kwinClient) &&
|
!Clients.isFullScreenGeometry(kwinClient) // not using `kwinClient.fullScreen` because it may not be set yet at this point
|
||||||
!Clients.isFullScreenGeometry(kwinClient) // not using `kwinClient.fullScreen` because it may not be set yet at this point
|
) {
|
||||||
) {
|
world.do(() => window.onFrameGeometryChanged());
|
||||||
window.onFrameGeometryChanged();
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
manager.connect(kwinClient.fullScreenChanged, () => {
|
manager.connect(kwinClient.fullScreenChanged, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user