diff --git a/src/components/views/elements/DesktopCapturerSourcePicker.tsx b/src/components/views/elements/DesktopCapturerSourcePicker.tsx index e1f1def8360..43644f835f7 100644 --- a/src/components/views/elements/DesktopCapturerSourcePicker.tsx +++ b/src/components/views/elements/DesktopCapturerSourcePicker.tsx @@ -79,13 +79,31 @@ export default class DesktopCapturerSourcePicker extends React.Component { + if (this.isWayland()) { + const sources = await getDesktopCapturerSources(); + this.props.onFinished(sources[0]); // Automatically select the first source or handle accordingly + return; + } + + // window.setInterval() first waits and then executes, therefore // we call getDesktopCapturerSources() here without any delay. // Otherwise the dialog would be left empty for some time. @@ -102,7 +120,9 @@ export default class DesktopCapturerSourcePicker extends React.Component { @@ -139,6 +159,11 @@ export default class DesktopCapturerSourcePicker extends React.Component> = [ this.getTab(Tabs.Screens, _td("voip|screenshare_monitor")), this.getTab(Tabs.Windows, _td("voip|screenshare_window")),