make helper not blocking

This commit is contained in:
abakkk 2021-04-04 12:09:33 +02:00
parent 5ad5dfffd1
commit 25e1f27ac9
1 changed files with 10 additions and 4 deletions

View File

@ -73,8 +73,13 @@ var DrawingHelper = new Lang.Class({
}, },
_updateHelpKeyLabel: function() { _updateHelpKeyLabel: function() {
let [keyval, mods] = Gtk.accelerator_parse(Me.internalShortcutSettings.get_strv('toggle-help')[0] || ''); try {
this._helpKeyLabel = Gtk.accelerator_get_label(keyval, mods); let [keyval, mods] = Gtk.accelerator_parse(Me.internalShortcutSettings.get_strv('toggle-help')[0] || '');
this._helpKeyLabel = Gtk.accelerator_get_label(keyval, mods);
} catch(e) {
logError(e);
this._helpKeyLabel = " ";
}
}, },
get helpKeyLabel() { get helpKeyLabel() {
@ -172,10 +177,11 @@ var DrawingHelper = new Lang.Class({
this.set_position(Math.floor(this.monitor.width / 2 - this.width / 2), this.set_position(Math.floor(this.monitor.width / 2 - this.width / 2),
Math.floor(this.monitor.height / 2 - this.height / 2)); Math.floor(this.monitor.height / 2 - this.height / 2));
// St.PolicyType: GS 3.32+
if (this.height == maxHeight) if (this.height == maxHeight)
this.vscrollbar_policy = Gtk.PolicyType.ALWAYS; this.vscrollbar_policy = St.PolicyType ? St.PolicyType.ALWAYS : Gtk.PolicyType.ALWAYS;
else else
this.vscrollbar_policy = Gtk.PolicyType.NEVER; this.vscrollbar_policy = St.PolicyType ? St.PolicyType.NEVER : Gtk.PolicyType.NEVER;
if (Tweener) { if (Tweener) {
Tweener.removeTweens(this); Tweener.removeTweens(this);