diff --git a/always-open-on-active-screen/always-open-on-active-screen_v5.0.kwinscript b/always-open-on-active-screen/always-open-on-active-screen_v5.0.kwinscript index b1b609c..13560f9 100644 Binary files a/always-open-on-active-screen/always-open-on-active-screen_v5.0.kwinscript and b/always-open-on-active-screen/always-open-on-active-screen_v5.0.kwinscript differ diff --git a/always-open-on-active-screen/contents/code/main.js b/always-open-on-active-screen/contents/code/main.js index 3cadc8a..c206286 100644 --- a/always-open-on-active-screen/contents/code/main.js +++ b/always-open-on-active-screen/contents/code/main.js @@ -22,7 +22,7 @@ const config = { debug("config:", config.allowMode ? "allow" : "deny", "list", config.classList); // when a window is added -workspace.clientAdded.connect(window => { +workspace.windowAdded.connect(window => { debug("window", JSON.stringify(window, undefined, 2)); // get active screen @@ -42,8 +42,8 @@ workspace.clientAdded.connect(window => { // clip and move window into bounds of screen dimensions const area = workspace.clientArea(KWin.MaximizeArea, window); - window.geometry.width = Math.min(area.width, window.width); - window.geometry.height = Math.min(area.height, window.height); - window.geometry.x = Math.max(area.x, Math.min(area.x + area.width - window.width, window.x)); - window.geometry.y = Math.max(area.y, Math.min(area.y + area.height - window.height, window.y)); + window.frameGeometry.width = Math.min(area.width, window.width); + window.frameGeometry.height = Math.min(area.height, window.height); + window.frameGeometry.x = Math.max(area.x, Math.min(area.x + area.width - window.width, window.x)); + window.frameGeometry.y = Math.max(area.y, Math.min(area.y + area.height - window.height, window.y)); }); diff --git a/always-open-on-focused-screen/always-open-on-focused-screen_v5.0.kwinscript b/always-open-on-focused-screen/always-open-on-focused-screen_v5.0.kwinscript index e7bafc2..4cedb92 100644 Binary files a/always-open-on-focused-screen/always-open-on-focused-screen_v5.0.kwinscript and b/always-open-on-focused-screen/always-open-on-focused-screen_v5.0.kwinscript differ diff --git a/always-open-on-focused-screen/contents/code/main.js b/always-open-on-focused-screen/contents/code/main.js index 91f0318..d26d39b 100644 --- a/always-open-on-focused-screen/contents/code/main.js +++ b/always-open-on-focused-screen/contents/code/main.js @@ -30,7 +30,7 @@ workspace.clientActivated.connect(window => { }); // when a window is added -workspace.clientAdded.connect(window => { +workspace.windowAdded.connect(window => { debug("window", JSON.stringify(window, undefined, 2)); // abort conditions @@ -47,8 +47,8 @@ workspace.clientAdded.connect(window => { // clip and move window into bounds of screen dimensions const area = workspace.clientArea(KWin.MaximizeArea, window); - window.geometry.width = Math.min(area.width, window.width); - window.geometry.height = Math.min(area.height, window.height); - window.geometry.x = Math.max(area.x, Math.min(area.x + area.width - window.width, window.x)); - window.geometry.y = Math.max(area.y, Math.min(area.y + area.height - window.height, window.y)); + window.frameGeometry.width = Math.min(area.width, window.width); + window.frameGeometry.height = Math.min(area.height, window.height); + window.frameGeometry.x = Math.max(area.x, Math.min(area.x + area.width - window.width, window.x)); + window.frameGeometry.y = Math.max(area.y, Math.min(area.y + area.height - window.height, window.y)); }); diff --git a/always-open-on-primary-screen/always-open-on-primary-screen_v5.0.kwinscript b/always-open-on-primary-screen/always-open-on-primary-screen_v5.0.kwinscript index c1a73df..f02a27b 100644 Binary files a/always-open-on-primary-screen/always-open-on-primary-screen_v5.0.kwinscript and b/always-open-on-primary-screen/always-open-on-primary-screen_v5.0.kwinscript differ diff --git a/always-open-on-primary-screen/contents/code/main.js b/always-open-on-primary-screen/contents/code/main.js index b13296e..a62be36 100644 --- a/always-open-on-primary-screen/contents/code/main.js +++ b/always-open-on-primary-screen/contents/code/main.js @@ -25,7 +25,7 @@ const config = { var primaryScreen = 0; // when a window is added -workspace.clientAdded.connect(window => { +workspace.windowAdded.connect(window => { debug("window", JSON.stringify(window, undefined, 2)); // abort conditions @@ -42,8 +42,8 @@ workspace.clientAdded.connect(window => { // clip and move window into bounds of screen dimensions const area = workspace.clientArea(KWin.MaximizeArea, window); - window.geometry.width = Math.min(area.width, window.width); - window.geometry.height = Math.min(area.height, window.height); - window.geometry.x = Math.max(area.x, Math.min(area.x + area.width - window.width, window.x)); - window.geometry.y = Math.max(area.y, Math.min(area.y + area.height - window.height, window.y)); + window.frameGeometry.width = Math.min(area.width, window.width); + window.frameGeometry.height = Math.min(area.height, window.height); + window.frameGeometry.x = Math.max(area.x, Math.min(area.x + area.width - window.width, window.x)); + window.frameGeometry.y = Math.max(area.y, Math.min(area.y + area.height - window.height, window.y)); });