mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01: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 New Issue
Block a user