Use 'global.display' when 'global.screen' is not available (fixes tea cup animation for gnome 3.30)

This commit is contained in:
Peter Liebetraut 2019-03-27 21:40:37 +01:00
parent e5a5e61398
commit 1a30460f4c

View File

@ -112,7 +112,12 @@ const TeaTimeFullscreenNotification = new Lang.Class({
},
show: function () {
if (typeof Layout.MonitorConstraint != 'undefined') {
this._monitorConstraint.index = global.screen.get_current_monitor()
// global.display was introduced in gnome-shell 3.30
if (typeof global.screen != 'undefined') {
this._monitorConstraint.index = global.screen.get_current_monitor();
} else {
this._monitorConstraint.index = global.display.get_current_monitor();
}
}
Main.pushModal(this._bin);
this._timeline.start();