ClientWrapper: don't try to maximize/fullscreenify unsupporting windows
This commit is contained in:
2
src/extern/kwin.d.ts
vendored
2
src/extern/kwin.d.ts
vendored
@@ -55,6 +55,8 @@ interface KwinClient {
|
||||
readonly move: boolean;
|
||||
readonly resize: boolean;
|
||||
readonly resizeable: boolean;
|
||||
readonly fullScreenable: boolean;
|
||||
readonly maximizable: boolean;
|
||||
readonly output: Output;
|
||||
readonly resourceClass: QByteArray;
|
||||
readonly dock: boolean;
|
||||
|
||||
@@ -80,6 +80,10 @@ class ClientWrapper {
|
||||
}
|
||||
|
||||
public setMaximize(horizontally: boolean, vertically: boolean) {
|
||||
if (!this.kwinClient.maximizable) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.maximizedMode === undefined) {
|
||||
if (horizontally && vertically) {
|
||||
this.maximizedMode = MaximizedMode.Maximized;
|
||||
@@ -91,12 +95,17 @@ class ClientWrapper {
|
||||
this.maximizedMode = MaximizedMode.Unmaximized;
|
||||
}
|
||||
}
|
||||
|
||||
this.manipulatingGeometry.do(() => {
|
||||
this.kwinClient.setMaximize(vertically, horizontally);
|
||||
});
|
||||
}
|
||||
|
||||
public setFullScreen(fullScreen: boolean) {
|
||||
if (!this.kwinClient.fullScreenable) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.manipulatingGeometry.do(() => {
|
||||
this.kwinClient.fullScreen = fullScreen;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user