mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-05-28 16:44:05 +00:00
Hyprland: fix app title
This commit is contained in:
@@ -242,8 +242,8 @@ Item {
|
||||
if (!windowId)
|
||||
return null
|
||||
|
||||
const appId = extractAppId(toplevel)
|
||||
const title = safeGetProperty(toplevel, "title", "")
|
||||
const appId = getAppId(toplevel)
|
||||
const title = getAppTitle(toplevel)
|
||||
const wsId = toplevel.workspace ? toplevel.workspace.id : null
|
||||
const focused = toplevel.activated === true
|
||||
const output = toplevel.monitor?.name || ""
|
||||
@@ -261,8 +261,19 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
// Extract app ID from various possible sources
|
||||
function extractAppId(toplevel) {
|
||||
function getAppTitle(toplevel) {
|
||||
try {
|
||||
var title = toplevel.wayland.title
|
||||
if (title)
|
||||
return title
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
return safeGetProperty(toplevel, "title", "")
|
||||
}
|
||||
|
||||
function getAppId(toplevel) {
|
||||
if (!toplevel)
|
||||
return ""
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ Item {
|
||||
|
||||
try {
|
||||
// Safely extract properties
|
||||
const appId = extractAppId(toplevel)
|
||||
const appId = getAppId(toplevel)
|
||||
const title = safeGetProperty(toplevel, "title", "")
|
||||
const focused = toplevel.activated === true
|
||||
|
||||
@@ -213,8 +213,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
// Extract app ID from various possible sources
|
||||
function extractAppId(toplevel) {
|
||||
function getAppId(toplevel) {
|
||||
if (!toplevel)
|
||||
return ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user