Merge pull request #6 from ferrreo/add-swww-support
Fix: active window not always working - also add support for other compositors
This commit is contained in:
commit
c78b61842e
1 changed files with 23 additions and 3 deletions
|
|
@ -9,10 +9,30 @@ Item {
|
|||
id: activeWindowWrapper
|
||||
width: parent.width
|
||||
property int fullHeight: activeWindowTitleContainer.height
|
||||
property bool shouldShow: false
|
||||
|
||||
y: panel.activeWindowVisible ? barBackground.height : barBackground.height - fullHeight
|
||||
height: panel.activeWindowVisible ? fullHeight : 1
|
||||
opacity: panel.activeWindowVisible ? 1 : 0
|
||||
Timer {
|
||||
id: visibilityTimer
|
||||
interval: 4000
|
||||
running: false
|
||||
onTriggered: {
|
||||
activeWindowWrapper.shouldShow = false
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: ToplevelManager
|
||||
function onActiveToplevelChanged() {
|
||||
if (ToplevelManager.activeToplevel?.appId) {
|
||||
activeWindowWrapper.shouldShow = true
|
||||
visibilityTimer.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
y: shouldShow ? barBackground.height : barBackground.height - fullHeight
|
||||
height: shouldShow ? fullHeight : 1
|
||||
opacity: shouldShow ? 1 : 0
|
||||
clip: true
|
||||
|
||||
function getIcon() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue