1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2026-02-08 00:32:27 +00:00

Fix fullscreen not tied to multiple windows.

This commit is contained in:
Filippo Scognamiglio
2026-01-17 18:35:05 +01:00
parent e70268bb73
commit 5795aeb6b7
4 changed files with 18 additions and 17 deletions

View File

@@ -65,11 +65,10 @@ QtObject {
text: qsTr("Fullscreen")
enabled: !appSettings.isMacOS
shortcut: "Alt+F11"
onTriggered: appSettings.fullscreen = !appSettings.fullscreen
checkable: true
checked: appSettings.fullscreen
}
property bool initialFullscreenRequested: Qt.application.arguments.indexOf("--fullscreen") !== -1
property Action newWindowAction: Action {
text: qsTr("New Window")
shortcut: "Ctrl+Shift+N"
@@ -127,11 +126,13 @@ QtObject {
}
function createWindow() {
var window = windowComponent.createObject(null)
var useFullscreen = initialFullscreenRequested
var window = windowComponent.createObject(null, { fullscreen: useFullscreen })
if (!window)
return
windowsModel.append({ window: window })
initialFullscreenRequested = false
window.show()
window.requestActivate()
}