mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Compositor: fix getFocusedWindow()
This commit is contained in:
@@ -128,7 +128,15 @@ Singleton {
|
||||
windowListChanged()
|
||||
}
|
||||
|
||||
// Get window title for focused window
|
||||
// Get focused window
|
||||
function getFocusedWindow() {
|
||||
if (focusedWindowIndex >= 0 && focusedWindowIndex < windows.count) {
|
||||
return windows.get(focusedWindowIndex)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
// Get focused window title
|
||||
function getFocusedWindowTitle() {
|
||||
if (focusedWindowIndex >= 0 && focusedWindowIndex < windows.count) {
|
||||
return windows.get(focusedWindowIndex).title || ""
|
||||
@@ -177,14 +185,6 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
// Get focused window
|
||||
function getFocusedWindow() {
|
||||
if (focusedWindowIndex >= 0 && focusedWindowIndex < windows.count) {
|
||||
return windows[focusedWindowIndex]
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
// Close window
|
||||
function closeWindow(windowId) {
|
||||
if (backend && backend.closeWindow) {
|
||||
|
||||
Reference in New Issue
Block a user