From 557c4d27e1520672a41fc6c069bbe27f31386148 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Sat, 28 Oct 2023 12:06:59 -0700 Subject: [PATCH] kwin: Fix warnings --- .../mobiletaskswitcher.json | 1 - .../convergentwindows/contents/ui/main.qml | 34 +++++++++---------- kwin/scripts/convergentwindows/metadata.json | 3 +- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/kwin/mobiletaskswitcher/mobiletaskswitcher.json b/kwin/mobiletaskswitcher/mobiletaskswitcher.json index 5b6cb7de..851b98f9 100644 --- a/kwin/mobiletaskswitcher/mobiletaskswitcher.json +++ b/kwin/mobiletaskswitcher/mobiletaskswitcher.json @@ -26,7 +26,6 @@ "Description[x-test]": "xxAllows you to switch between running tasks with a mobile interface.xx", "Description[zh_CN]": "允许您使用移动界面在正在运行的任务之间切换。", "EnabledByDefault": true, - "Id": "mobiletaskswitcher", "License": "GPL", "Name": "Mobile Task Switcher", "Name[ca@valencia]": "Commutador de tasques del mòbil", diff --git a/kwin/scripts/convergentwindows/contents/ui/main.qml b/kwin/scripts/convergentwindows/contents/ui/main.qml index 76482d0a..8ec55447 100644 --- a/kwin/scripts/convergentwindows/contents/ui/main.qml +++ b/kwin/scripts/convergentwindows/contents/ui/main.qml @@ -9,12 +9,12 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings Item { id: root - function run(client) { + function run(window) { if (!ShellSettings.Settings.convergenceModeEnabled) { - client.setMaximize(true, true); - client.noBorder = true; + window.noBorder = true; + window.setMaximize(true, true); } else { - client.noBorder = false; + window.noBorder = false; } } @@ -22,11 +22,11 @@ Item { target: ShellSettings.Settings function onConvergenceModeEnabledChanged() { - const clients = KWinComponents.Workspace.windows; + const windows = KWinComponents.Workspace.windows; - for (let i = 0; i < clients.length; i++) { - if (clients[i].normalWindow) { - root.run(clients[i]); + for (let i = 0; i < windows.length; i++) { + if (windows[i].normalWindow) { + root.run(windows[i]); } } } @@ -35,12 +35,12 @@ Item { Connections { target: KWinComponents.Workspace - function onWindowAdded(client) { - if (client.normalWindow) { - client.interactiveMoveResizeFinished.connect((client) => { - root.run(client); + function onWindowAdded(window) { + if (window.normalWindow) { + window.interactiveMoveResizeFinished.connect((window) => { + root.run(window); }); - root.run(client); + root.run(window); } } @@ -48,11 +48,11 @@ Item { // Windows are moved from the external screen // to the internal screen if the external screen // is disconnected. - const clients = KWinComponents.Workspace.windows; + const windows = KWinComponents.Workspace.windows; - for (var i = 0; i < clients.length; i++) { - if (clients[i].normalWindow) { - root.run(clients[i]); + for (var i = 0; i < windows.length; i++) { + if (windows[i].normalWindow) { + root.run(windows[i]); } } } diff --git a/kwin/scripts/convergentwindows/metadata.json b/kwin/scripts/convergentwindows/metadata.json index 1a64bd31..b4295ef2 100644 --- a/kwin/scripts/convergentwindows/metadata.json +++ b/kwin/scripts/convergentwindows/metadata.json @@ -56,8 +56,7 @@ "Description[x-test]": "xxRemoves window decorations and maximizes windows on the first screen only.xx", "Description[zh_CN]": "删除窗口装饰并最大化第一个屏幕上的窗口。", "Icon": "preferences-system-windows", - "Id": "convergentwindows", - "Licsense": "LGPL-2.1-or-later", + "License": "LGPL-2.1-or-later", "Name": "Convergent Windows", "Name[ca@valencia]": "Finestres convergents", "Name[ca]": "Finestres convergents",