forked from Blendman974/faceclaw
Performance optimizations
This commit is contained in:
1 parent
e49c699062
commit
f6035ea9ec
18 files changed
+715
-158
No files matched your search
@@ -599,6 +599,20 @@ class Shell {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Compact description of where input is currently going, for the frame
|
||||
* timing export: "which app was drawing" is usually the first thing you need
|
||||
* to interpret an input-to-display latency, and it is not recoverable from
|
||||
* the input event itself.
|
||||
*/
|
||||
describeInputTarget(): string {
|
||||
const foreground = this.foregroundWindow()?.windowId ?? "none";
|
||||
if (!this.screenOn) return `fg=${foreground} target=screen-off`;
|
||||
if (this.activeVoiceLayer) return `fg=${foreground} target=voice`;
|
||||
if (!this.stack.isAtBase()) return `fg=${foreground} target=shell-overlay`;
|
||||
return `fg=${foreground} target=${this.focus}`;
|
||||
}
|
||||
|
||||
/** Whether a window is the current input target (foreground + focus in-window). */
|
||||
isWindowFocused(windowId: string): boolean {
|
||||
return this.screenOn && this.focus === "window" && this.foregroundWindow()?.windowId === windowId;
|
||||
|
||||
Reference in new issue
Block a user