()
| 497 | |
| 498 | export class WindowManager { |
| 499 | constructor() { |
| 500 | this._shellwm = global.window_manager; |
| 501 | |
| 502 | this._minimizing = new Set(); |
| 503 | this._unminimizing = new Set(); |
| 504 | this._mapping = new Set(); |
| 505 | this._resizing = new Set(); |
| 506 | this._resizePending = new Set(); |
| 507 | this._destroying = new Set(); |
| 508 | |
| 509 | this._skippedActors = new Set(); |
| 510 | |
| 511 | this._allowedKeybindings = {}; |
| 512 | |
| 513 | this._isWorkspacePrepended = false; |
| 514 | this._canScroll = true; // limiting scrolling speed |
| 515 | this._blockCount = 0; |
| 516 | |
| 517 | this._shellwm.connect('kill-window-effects', (shellwm, actor) => { |
| 518 | this._minimizeWindowDone(shellwm, actor); |
| 519 | this._mapWindowDone(shellwm, actor); |
| 520 | this._destroyWindowDone(shellwm, actor); |
| 521 | this._sizeChangeWindowDone(shellwm, actor); |
| 522 | }); |
| 523 | |
| 524 | this._shellwm.connect('switch-workspace', this._switchWorkspace.bind(this)); |
| 525 | this._shellwm.connect('show-tile-preview', this._showTilePreview.bind(this)); |
| 526 | this._shellwm.connect('hide-tile-preview', this._hideTilePreview.bind(this)); |
| 527 | this._shellwm.connect('show-window-menu', this._showWindowMenu.bind(this)); |
| 528 | this._shellwm.connect('minimize', this._minimizeWindow.bind(this)); |
| 529 | this._shellwm.connect('unminimize', this._unminimizeWindow.bind(this)); |
| 530 | this._shellwm.connect('size-change', this._sizeChangeWindow.bind(this)); |
| 531 | this._shellwm.connect('size-changed', this._sizeChangedWindow.bind(this)); |
| 532 | this._shellwm.connect('map', this._mapWindow.bind(this)); |
| 533 | this._shellwm.connect('destroy', this._destroyWindow.bind(this)); |
| 534 | this._shellwm.connect('filter-keybinding', this._filterKeybinding.bind(this)); |
| 535 | this._shellwm.connect('confirm-display-change', this._confirmDisplayChange.bind(this)); |
| 536 | this._shellwm.connect('create-close-dialog', this._createCloseDialog.bind(this)); |
| 537 | this._shellwm.connect('create-inhibit-shortcuts-dialog', this._createInhibitShortcutsDialog.bind(this)); |
| 538 | |
| 539 | this._workspaceSwitcherPopup = null; |
| 540 | this._tilePreview = null; |
| 541 | |
| 542 | this.allowKeybinding('switch-to-session-1', Shell.ActionMode.ALL); |
| 543 | this.allowKeybinding('switch-to-session-2', Shell.ActionMode.ALL); |
| 544 | this.allowKeybinding('switch-to-session-3', Shell.ActionMode.ALL); |
| 545 | this.allowKeybinding('switch-to-session-4', Shell.ActionMode.ALL); |
| 546 | this.allowKeybinding('switch-to-session-5', Shell.ActionMode.ALL); |
| 547 | this.allowKeybinding('switch-to-session-6', Shell.ActionMode.ALL); |
| 548 | this.allowKeybinding('switch-to-session-7', Shell.ActionMode.ALL); |
| 549 | this.allowKeybinding('switch-to-session-8', Shell.ActionMode.ALL); |
| 550 | this.allowKeybinding('switch-to-session-9', Shell.ActionMode.ALL); |
| 551 | this.allowKeybinding('switch-to-session-10', Shell.ActionMode.ALL); |
| 552 | this.allowKeybinding('switch-to-session-11', Shell.ActionMode.ALL); |
| 553 | this.allowKeybinding('switch-to-session-12', Shell.ActionMode.ALL); |
| 554 | |
| 555 | this.setCustomKeybindingHandler('switch-to-workspace-left', |
| 556 | Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, |
nothing calls this directly
no test coverage detected