mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
kwin/convergentwindows: keep current window maximized bugfix
This fix maximizes the current window if it ever leaves a fullscreen or maximized state. This is to fix a bug where if a window exits fullscreen mode, it will not return back to a maximized state.
This commit is contained in:
parent
c2f91fa407
commit
36f0d175fd
1 changed files with 33 additions and 0 deletions
|
|
@ -9,6 +9,8 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
Loader {
|
Loader {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property var currentWindow
|
||||||
|
|
||||||
function run(window) {
|
function run(window) {
|
||||||
// HACK: don't maximize xwaylandvideobridge
|
// HACK: don't maximize xwaylandvideobridge
|
||||||
// see: https://invent.kde.org/plasma/plasma-mobile/-/issues/324
|
// see: https://invent.kde.org/plasma/plasma-mobile/-/issues/324
|
||||||
|
|
@ -44,6 +46,27 @@ Loader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: currentWindow
|
||||||
|
|
||||||
|
function onFullScreenChanged() {
|
||||||
|
currentWindow.interactiveMoveResizeFinished.connect((currentWindow) => {
|
||||||
|
root.run(currentWindow);
|
||||||
|
});
|
||||||
|
root.run(currentWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onMaximizedChanged() {
|
||||||
|
if (!currentWindow.maximizable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
currentWindow.interactiveMoveResizeFinished.connect((currentWindow) => {
|
||||||
|
root.run(currentWindow);
|
||||||
|
});
|
||||||
|
root.run(currentWindow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: ShellSettings.Settings
|
target: ShellSettings.Settings
|
||||||
|
|
||||||
|
|
@ -70,6 +93,16 @@ Loader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onWindowActivated(window) {
|
||||||
|
if (window.normalWindow) {
|
||||||
|
currentWindow = window;
|
||||||
|
window.interactiveMoveResizeFinished.connect((window) => {
|
||||||
|
root.run(window);
|
||||||
|
});
|
||||||
|
root.run(window);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onScreensChanged() {
|
function onScreensChanged() {
|
||||||
// Windows are moved from the external screen
|
// Windows are moved from the external screen
|
||||||
// to the internal screen if the external screen
|
// to the internal screen if the external screen
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue