mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 23:35:43 +00:00
Fix Linux HUD input handling
This commit is contained in:
+15
-3
@@ -45,6 +45,10 @@ function isHudOverlayCaptureProtectionSupported(): boolean {
|
||||
return process.platform !== "linux";
|
||||
}
|
||||
|
||||
function isHudOverlayMousePassthroughSupported(): boolean {
|
||||
return process.platform !== "linux";
|
||||
}
|
||||
|
||||
function loadHudOverlayCaptureProtectionSetting(): boolean {
|
||||
if (hudOverlayCaptureProtectionLoaded) {
|
||||
return hudOverlayHiddenFromCapture;
|
||||
@@ -174,11 +178,17 @@ function positionUpdateToastWindow() {
|
||||
|
||||
ipcMain.on("hud-overlay-set-ignore-mouse", (_event, ignore: boolean) => {
|
||||
if (hudOverlayWindow && !hudOverlayWindow.isDestroyed()) {
|
||||
if (!isHudOverlayMousePassthroughSupported()) {
|
||||
hudOverlayWindow.setIgnoreMouseEvents(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ignore) {
|
||||
hudOverlayWindow.setIgnoreMouseEvents(true, { forward: true });
|
||||
} else {
|
||||
hudOverlayWindow.setIgnoreMouseEvents(false);
|
||||
return;
|
||||
}
|
||||
|
||||
hudOverlayWindow.setIgnoreMouseEvents(false);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -320,7 +330,9 @@ export function createHudOverlayWindow(): BrowserWindow {
|
||||
win.setContentProtection(hudOverlayHiddenFromCapture);
|
||||
}
|
||||
|
||||
win.setIgnoreMouseEvents(true, { forward: true });
|
||||
if (isHudOverlayMousePassthroughSupported()) {
|
||||
win.setIgnoreMouseEvents(true, { forward: true });
|
||||
}
|
||||
|
||||
// On Windows 10, focus changes (e.g. showing a native notification) can break
|
||||
// setIgnoreMouseEvents forwarding on a transparent always-on-top window, making
|
||||
|
||||
Reference in New Issue
Block a user