refactor: replace deprecated geometry property

This commit is contained in:
Mikhail Zolotukhin 2022-03-25 16:46:37 +03:00 committed by Genda
parent b5e29933d1
commit a1d9c3750d
3 changed files with 10 additions and 10 deletions

View File

@ -399,7 +399,7 @@ export class DriverImpl implements Driver {
}
});
this.connect(client.geometryChanged, () => {
this.connect(client.frameGeometryChanged, () => {
if (moving) {
this.controller.onWindowMove(window);
} else if (resizing) {

View File

@ -98,7 +98,7 @@ export class DriverWindowImpl implements DriverWindow {
}
public get geometry(): Rect {
return Rect.fromQRect(this.client.geometry);
return Rect.fromQRect(this.client.frameGeometry);
}
public get active(): boolean {
@ -287,7 +287,7 @@ export class DriverWindowImpl implements DriverWindow {
geometry = this.adjustGeometry(geometry);
}
}
this.client.geometry = geometry.toQRect();
this.client.frameGeometry = geometry.toQRect();
}
}
@ -321,8 +321,8 @@ export class DriverWindowImpl implements DriverWindow {
/* do not resize fixed-size windows */
if (!this.client.resizeable) {
width = this.client.geometry.width;
height = this.client.geometry.height;
width = this.client.frameGeometry.width;
height = this.client.frameGeometry.height;
} else {
/* respect min/max size limit */
width = clip(width, this.client.minSize.width, this.client.maxSize.width);

View File

@ -146,9 +146,8 @@ declare namespace KWin {
/**
* This signal is emitted when the Toplevel's frame geometry changes.
* @deprecated since 5.19, use frameGeometryChanged instead
*/
geometryChanged: QSignal;
frameGeometryChanged: QSignal;
/**
* Emitted whenever the Toplevel's screen changes. This can happen either in consequence to
@ -157,7 +156,7 @@ declare namespace KWin {
screenChanged: QSignal;
/**
* Emitted when the toplevel is shown?
* Emitted when the Toplevel is shown?
*/
windowShown: QSignal;
}
@ -230,9 +229,10 @@ declare namespace KWin {
fullScreen: boolean;
/**
* Window geometry
* This property holds the geometry of the Toplevel, excluding invisible
* portions, e.g. server-side and client-side drop-shadows, etc.
*/
geometry: QRect;
frameGeometry: QRect;
/**
* Whether the window is set to be above all