Add a debug keybinding to pause/resume all tweens
So we can inspect a mid-tween scene easier.
This commit is contained in:
parent
9df09db5fe
commit
9bb4d17e31
@ -116,6 +116,11 @@
|
||||
Keybinding to focus the active notification.
|
||||
</_description>
|
||||
</key>
|
||||
<key name="pause-resume-tweens" type="as">
|
||||
<default>[]</default>
|
||||
<summary>Keybinding that pauses and resumes all running tweens, for debugging purposes</summary>
|
||||
<description></description>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
|
||||
|
@ -556,6 +556,12 @@ const WindowManager = new Lang.Class({
|
||||
Shell.KeyBindingMode.LOGIN_SCREEN,
|
||||
Lang.bind(this, this._startA11ySwitcher));
|
||||
|
||||
this.addKeybinding('toggle-tweens',
|
||||
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
||||
Meta.KeyBindingFlags.NONE,
|
||||
Shell.KeyBindingMode.ALL,
|
||||
Lang.bind(this, this._toggleTweens));
|
||||
|
||||
this.addKeybinding('open-application-menu',
|
||||
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
||||
Meta.KeyBindingFlags.NONE,
|
||||
@ -1088,6 +1094,15 @@ const WindowManager = new Lang.Class({
|
||||
Main.panel.toggleAppMenu();
|
||||
},
|
||||
|
||||
_toggleTweens: function() {
|
||||
this._tweensPaused = !this._tweensPaused;
|
||||
const OrigTweener = imports.tweener.tweener;
|
||||
if (this._tweensPaused)
|
||||
OrigTweener.pauseAllTweens();
|
||||
else
|
||||
OrigTweener.resumeAllTweens();
|
||||
},
|
||||
|
||||
_showWorkspaceSwitcher : function(display, screen, window, binding) {
|
||||
if (!Main.sessionMode.hasWorkspaces)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user