mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 01:32:29 -04:00
@@ -842,7 +842,12 @@ Item {
|
|||||||
wsData = modelData;
|
wsData = modelData;
|
||||||
}
|
}
|
||||||
delegateRoot.loadedWorkspaceData = wsData;
|
delegateRoot.loadedWorkspaceData = wsData;
|
||||||
delegateRoot.loadedIsUrgent = wsData?.urgent ?? false;
|
if (CompositorService.isNiri) {
|
||||||
|
const workspaceId = wsData?.id;
|
||||||
|
delegateRoot.loadedIsUrgent = workspaceId ? NiriService.windows.some(w => w.workspace_id === workspaceId && w.is_urgent) : false;
|
||||||
|
} else {
|
||||||
|
delegateRoot.loadedIsUrgent = wsData?.urgent ?? false;
|
||||||
|
}
|
||||||
|
|
||||||
var icData = null;
|
var icData = null;
|
||||||
if (wsData?.name) {
|
if (wsData?.name) {
|
||||||
@@ -878,8 +883,8 @@ Item {
|
|||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: isActive ? Theme.primary : isUrgent ? Theme.error : isPlaceholder ? Theme.surfaceTextLight : isHovered ? Theme.outlineButton : Theme.surfaceTextAlpha
|
color: isActive ? Theme.primary : isUrgent ? Theme.error : isPlaceholder ? Theme.surfaceTextLight : isHovered ? Theme.outlineButton : Theme.surfaceTextAlpha
|
||||||
|
|
||||||
border.width: isUrgent && !isActive ? 2 : 0
|
border.width: isUrgent ? 2 : 0
|
||||||
border.color: isUrgent && !isActive ? Theme.error : Theme.withAlpha(Theme.error, 0)
|
border.color: isUrgent ? Theme.error : Theme.withAlpha(Theme.error, 0)
|
||||||
|
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|||||||
@@ -304,6 +304,9 @@ Singleton {
|
|||||||
case 'WorkspaceUrgencyChanged':
|
case 'WorkspaceUrgencyChanged':
|
||||||
handleWorkspaceUrgencyChanged(event.WorkspaceUrgencyChanged);
|
handleWorkspaceUrgencyChanged(event.WorkspaceUrgencyChanged);
|
||||||
break;
|
break;
|
||||||
|
case 'WindowUrgencyChanged':
|
||||||
|
handleWindowUrgencyChanged(event.WindowUrgencyChanged);
|
||||||
|
break;
|
||||||
case 'ScreenshotCaptured':
|
case 'ScreenshotCaptured':
|
||||||
handleScreenshotCaptured(event.ScreenshotCaptured);
|
handleScreenshotCaptured(event.ScreenshotCaptured);
|
||||||
break;
|
break;
|
||||||
@@ -571,6 +574,23 @@ Singleton {
|
|||||||
windowUrgentChanged();
|
windowUrgentChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleWindowUrgencyChanged(data) {
|
||||||
|
const windowIndex = windows.findIndex(w => w.id === data.id);
|
||||||
|
if (windowIndex < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const updatedWindows = [...windows];
|
||||||
|
const updatedWindow = {};
|
||||||
|
for (let prop in updatedWindows[windowIndex]) {
|
||||||
|
updatedWindow[prop] = updatedWindows[windowIndex][prop];
|
||||||
|
}
|
||||||
|
updatedWindow.is_urgent = data.urgent;
|
||||||
|
updatedWindows[windowIndex] = updatedWindow;
|
||||||
|
windows = updatedWindows;
|
||||||
|
|
||||||
|
windowUrgentChanged();
|
||||||
|
}
|
||||||
|
|
||||||
function handleScreenshotCaptured(data) {
|
function handleScreenshotCaptured(data) {
|
||||||
if (!data.path)
|
if (!data.path)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user