mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2026-02-08 00:32:27 +00:00
Fix focus issue with multiple windows. Fix build issues with previous Qt versions.
This commit is contained in:
@@ -24,7 +24,7 @@ import "utils.js" as Utils
|
|||||||
Loader {
|
Loader {
|
||||||
id: burnInEffect
|
id: burnInEffect
|
||||||
|
|
||||||
property ShaderEffectSource source: item ? item.source : null
|
property ShaderEffectSource effectSource: item ? item.source : null
|
||||||
|
|
||||||
property real lastUpdate: 0
|
property real lastUpdate: 0
|
||||||
property real prevLastUpdate: 0
|
property real prevLastUpdate: 0
|
||||||
|
|||||||
@@ -83,13 +83,6 @@ Item{
|
|||||||
terminalContainer.updateSources()
|
terminalContainer.updateSources()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Connections {
|
|
||||||
target: terminalWindow
|
|
||||||
|
|
||||||
onActiveChanged: {
|
|
||||||
kterminal.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSources() {
|
function updateSources() {
|
||||||
kterminal.update()
|
kterminal.update()
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ Item {
|
|||||||
id: dynamicShader
|
id: dynamicShader
|
||||||
|
|
||||||
property ShaderEffectSource screenBuffer: frameBuffer
|
property ShaderEffectSource screenBuffer: frameBuffer
|
||||||
property ShaderEffectSource burnInSource: burnInEffect.source
|
property ShaderEffectSource burnInSource: burnInEffect.effectSource
|
||||||
property ShaderEffectSource frameSource: terminalFrameLoader.item
|
property ShaderEffectSource frameSource: terminalFrameLoader.item
|
||||||
|
|
||||||
property color fontColor: parent.fontColor
|
property color fontColor: parent.fontColor
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: tabsModel
|
model: tabsModel
|
||||||
TerminalContainer {
|
TerminalContainer {
|
||||||
property bool isCurrentItem: StackLayout.isCurrentItem
|
property bool shouldHaveFocus: terminalWindow.active && StackLayout.isCurrentItem
|
||||||
onIsCurrentItemChanged: {
|
onShouldHaveFocusChanged: {
|
||||||
if (isCurrentItem) {
|
if (shouldHaveFocus) {
|
||||||
activate()
|
activate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user