main: Inhibit animations when software rendered

This was previously decided by gsd-xsettings.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757
This commit is contained in:
Jonas Ådahl 2019-10-01 12:02:31 +02:00
parent f4f8982825
commit 394121f77d

View File

@ -161,6 +161,8 @@ function _initializeUI() {
_loadOskLayouts();
_loadDefaultStylesheet();
new AnimationsSettings();
// Setup the stage hierarchy early
layoutManager = new Layout.LayoutManager();
@ -758,3 +760,13 @@ function showRestartMessage(message) {
let restartMessage = new RestartMessage(message);
restartMessage.open();
}
var AnimationsSettings = class {
constructor() {
let backend = Meta.get_backend();
if (!backend.is_rendering_hardware_accelerated()) {
St.Settings.get().inhibit_animations();
return;
}
}
};