mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-11-04 13:37:43 +03:00
refactor: replace deprecated geometry property
This commit is contained in:
parent
b5e29933d1
commit
a1d9c3750d
@ -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) {
|
||||
|
@ -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);
|
||||
|
10
src/kwinscript/extern/kwin.d.ts
vendored
10
src/kwinscript/extern/kwin.d.ts
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user