mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-06 20:10:12 +02:00
handle disabled features in a single flag (#1271)
This commit is contained in:
+10
-9
@@ -272,11 +272,6 @@ if (isLinux() && !process.argv.some((a) => a.startsWith('--password-store='))) {
|
|||||||
app.commandLine.appendSwitch('password-store', passwordStore);
|
app.commandLine.appendSwitch('password-store', passwordStore);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle fractional scaling issue from Wayland https://github.com/jeffvli/feishin/issues/1271#issuecomment-4063326712
|
|
||||||
if (isLinux()) {
|
|
||||||
app.commandLine.appendSwitch('disable-features', 'WaylandFractionalScaleV1');
|
|
||||||
}
|
|
||||||
|
|
||||||
let mainWindow: BrowserWindow | null = null;
|
let mainWindow: BrowserWindow | null = null;
|
||||||
let tray: null | Tray = null;
|
let tray: null | Tray = null;
|
||||||
let exitFromTray = false;
|
let exitFromTray = false;
|
||||||
@@ -745,11 +740,17 @@ const playbackType = store.get('playbackType', PlayerType.WEB) as PlayerType;
|
|||||||
const shouldDisableMediaFeatures =
|
const shouldDisableMediaFeatures =
|
||||||
isLinux() || !enableMediaSession || playbackType !== PlayerType.WEB;
|
isLinux() || !enableMediaSession || playbackType !== PlayerType.WEB;
|
||||||
|
|
||||||
|
const chromiumDisabledFeatures: string[] = [];
|
||||||
|
// Fractional scaling on Wayland: https://github.com/jeffvli/feishin/issues/1271#issuecomment-4063326712
|
||||||
|
if (isLinux()) {
|
||||||
|
chromiumDisabledFeatures.push('WaylandFractionalScaleV1');
|
||||||
|
}
|
||||||
if (shouldDisableMediaFeatures) {
|
if (shouldDisableMediaFeatures) {
|
||||||
app.commandLine.appendSwitch(
|
chromiumDisabledFeatures.push('HardwareMediaKeyHandling', 'MediaSessionService');
|
||||||
'disable-features',
|
}
|
||||||
'HardwareMediaKeyHandling,MediaSessionService',
|
|
||||||
);
|
if (chromiumDisabledFeatures.length > 0) {
|
||||||
|
app.commandLine.appendSwitch('disable-features', chromiumDisabledFeatures.join(','));
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/electron/electron/issues/46538#issuecomment-2808806722
|
// https://github.com/electron/electron/issues/46538#issuecomment-2808806722
|
||||||
|
|||||||
Reference in New Issue
Block a user