moved isWayland to constants
This commit is contained in:
parent
dd6bd74427
commit
d37f07cedb
3 changed files with 5 additions and 4 deletions
|
@ -61,3 +61,6 @@ export const enum MessageBoxChoice {
|
||||||
Default,
|
Default,
|
||||||
Cancel
|
Cancel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const isWayland =
|
||||||
|
process.platform === "linux" && (process.env.XDG_SESSION_TYPE === "wayland" || !!process.env.WAYLAND_DISPLAY);
|
||||||
|
|
|
@ -31,13 +31,13 @@ import {
|
||||||
DATA_DIR,
|
DATA_DIR,
|
||||||
DEFAULT_HEIGHT,
|
DEFAULT_HEIGHT,
|
||||||
DEFAULT_WIDTH,
|
DEFAULT_WIDTH,
|
||||||
|
isWayland,
|
||||||
MessageBoxChoice,
|
MessageBoxChoice,
|
||||||
MIN_HEIGHT,
|
MIN_HEIGHT,
|
||||||
MIN_WIDTH,
|
MIN_WIDTH,
|
||||||
VENCORD_FILES_DIR
|
VENCORD_FILES_DIR
|
||||||
} from "./constants";
|
} from "./constants";
|
||||||
import { initKeybinds } from "./keybinds";
|
import { initKeybinds } from "./keybinds";
|
||||||
import { isWayland } from "./screenShare";
|
|
||||||
import { Settings, State, VencordSettings } from "./settings";
|
import { Settings, State, VencordSettings } from "./settings";
|
||||||
import { createSplashWindow } from "./splash";
|
import { createSplashWindow } from "./splash";
|
||||||
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
|
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
|
||||||
|
|
|
@ -8,11 +8,9 @@ import { desktopCapturer, session, Streams } from "electron";
|
||||||
import type { StreamPick } from "renderer/components/ScreenSharePicker";
|
import type { StreamPick } from "renderer/components/ScreenSharePicker";
|
||||||
import { IpcEvents } from "shared/IpcEvents";
|
import { IpcEvents } from "shared/IpcEvents";
|
||||||
|
|
||||||
|
import { isWayland } from "./constants";
|
||||||
import { handle } from "./utils/ipcWrappers";
|
import { handle } from "./utils/ipcWrappers";
|
||||||
|
|
||||||
export const isWayland =
|
|
||||||
process.platform === "linux" && (process.env.XDG_SESSION_TYPE === "wayland" || !!process.env.WAYLAND_DISPLAY);
|
|
||||||
|
|
||||||
export function registerScreenShareHandler() {
|
export function registerScreenShareHandler() {
|
||||||
handle(IpcEvents.CAPTURER_GET_LARGE_THUMBNAIL, async (_, id: string) => {
|
handle(IpcEvents.CAPTURER_GET_LARGE_THUMBNAIL, async (_, id: string) => {
|
||||||
const sources = await desktopCapturer.getSources({
|
const sources = await desktopCapturer.getSources({
|
||||||
|
|
Loading…
Reference in a new issue