screenshot: Move HAVE_RECORDER check into screencast service
Some gstreamer plugins require a connection to the display server, so if we end up initializing gstreamer before we are ourselves fully initialized, we may end up with a locked compositor. Avoid this by moving the runtime recorder check into the screencast D-Bus service, so that all gstreamer calls happen out of process. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5710 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2519>
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
/* exported main */
|
||||
|
||||
const Config = imports.misc.config;
|
||||
const { DBusService } = imports.dbusService;
|
||||
const {DBusService} = imports.dbusService;
|
||||
|
||||
function main() {
|
||||
if (!Config.HAVE_RECORDER)
|
||||
const {ScreencastService} = imports.screencastService;
|
||||
if (!ScreencastService.canScreencast())
|
||||
return;
|
||||
|
||||
const { ScreencastService } = imports.screencastService;
|
||||
const service = new DBusService(
|
||||
'org.gnome.Shell.Screencast',
|
||||
new ScreencastService());
|
||||
|
Reference in New Issue
Block a user