mirror of
https://github.com/vector-im/element-desktop.git
synced 2024-07-06 22:43:28 +00:00
enable flashFrame usage on linux (#1683)
Signed-off-by: Alex Meridian <alex@meridian.family>
This commit is contained in:
parent
ad31ceaea3
commit
c49f7e6b21
|
@ -38,7 +38,8 @@ ipcMain.on("setBadgeCount", function (_ev: IpcMainEvent, count: number): void {
|
||||||
|
|
||||||
let focusHandlerAttached = false;
|
let focusHandlerAttached = false;
|
||||||
ipcMain.on("loudNotification", function (): void {
|
ipcMain.on("loudNotification", function (): void {
|
||||||
if (process.platform === "win32" && global.mainWindow && !global.mainWindow.isFocused() && !focusHandlerAttached) {
|
if (process.platform === "win32" || process.platform === "linux") {
|
||||||
|
if (global.mainWindow && !global.mainWindow.isFocused() && !focusHandlerAttached) {
|
||||||
global.mainWindow.flashFrame(true);
|
global.mainWindow.flashFrame(true);
|
||||||
global.mainWindow.once("focus", () => {
|
global.mainWindow.once("focus", () => {
|
||||||
global.mainWindow?.flashFrame(false);
|
global.mainWindow?.flashFrame(false);
|
||||||
|
@ -46,6 +47,7 @@ ipcMain.on("loudNotification", function (): void {
|
||||||
});
|
});
|
||||||
focusHandlerAttached = true;
|
focusHandlerAttached = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let powerSaveBlockerId: number | null = null;
|
let powerSaveBlockerId: number | null = null;
|
||||||
|
|
Loading…
Reference in a new issue