mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Add CompositorService, make Logger look a bit nicer
This commit is contained in:
@@ -27,11 +27,11 @@ Row {
|
||||
|
||||
// Update text when window changes
|
||||
Connections {
|
||||
target: typeof NiriService !== "undefined" ? NiriService : null
|
||||
function onFocusedWindowIndexChanged() {
|
||||
target: CompositorService
|
||||
function onActiveWindowChanged() {
|
||||
// Check if window actually changed
|
||||
if (NiriService.focusedWindowIndex !== lastWindowIndex) {
|
||||
lastWindowIndex = NiriService.focusedWindowIndex
|
||||
if (CompositorService.focusedWindowIndex !== lastWindowIndex) {
|
||||
lastWindowIndex = CompositorService.focusedWindowIndex
|
||||
showingFullTitle = true
|
||||
fullTitleTimer.restart()
|
||||
}
|
||||
@@ -39,11 +39,7 @@ Row {
|
||||
}
|
||||
|
||||
function getFocusedWindow() {
|
||||
if (typeof NiriService === "undefined" || NiriService.focusedWindowIndex < 0
|
||||
|| NiriService.focusedWindowIndex >= NiriService.windows.length) {
|
||||
return null
|
||||
}
|
||||
return NiriService.windows[NiriService.focusedWindowIndex]
|
||||
return CompositorService.getFocusedWindow()
|
||||
}
|
||||
|
||||
function getTitle() {
|
||||
|
||||
Reference in New Issue
Block a user