mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
kwin: Fix warnings
This commit is contained in:
parent
93395acd02
commit
557c4d27e1
3 changed files with 18 additions and 20 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue