After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704448 - Looking Glass is stuck when St.set_slow_down_factor(); is 0
Looking Glass is stuck when St.set_slow_down_factor(); is 0
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-07-18 09:25 UTC by Nick Colley
Modified: 2013-08-04 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nick Colley 2013-07-18 09:25:58 UTC
When using gnome-shell with the impatience extension: https://extensions.gnome.org/extension/277/impatience/

I found that if you set it to zero looking glass will not perform the animation to drop down and stay at the top of the screen.

Steps to reproduce:
Install Impatience
Set animation speed to 0
Alt+F2 lg

Impatience extension.js:

const St = imports.gi.St;
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const DEFAULT_SPEED = 0.75;
const ExtensionUtils = imports.misc.extensionUtils;
const Extension = ExtensionUtils.getCurrentExtension();
const Settings = Extension.imports.settings;

function LOG(m){
	global.log("[impatience] " + m);
	log("[impatience] " + m);
};
function Ext() {
	this._init.apply(this, arguments);
};
var noop = function() {};

Ext.prototype = {};
Ext.prototype._init = function() {
	this.enabled = false;
	this.original_speed = St.get_slow_down_factor();
	this.modified_speed = DEFAULT_SPEED;
	this.unbind = noop;
};

Ext.prototype.enable = function() {
	this.enabled = true;
	var pref = (new Settings.Prefs()).SPEED;
	LOG("enabled");
	var binding = pref.changed(Lang.bind(this, function() {
		this.set_speed(pref.get());
	}));
	this.unbind = function() {
		pref.disconnect(binding);
		this.unbind = noop;
	};
	this.set_speed(pref.get());
};

Ext.prototype.disable = function() {
	this.enabled = false;
	this.unbind();
	St.set_slow_down_factor(this.original_speed);
};

Ext.prototype.set_speed = function(new_speed) {
	if(!this.enabled) {
		LOG("NOT setting new speed, since the extension is disabled.");
		return;
	}
	if(new_speed !== undefined) {
		this.modified_speed = new_speed;
	}
	LOG("setting new speed: " + this.modified_speed);
	St.set_slow_down_factor(this.modified_speed);
};

function init() {
	return new Ext();
};
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-08-04 09:48:29 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.