(msWindowManager: MsWindowManagerType)
| 23 | focusProtected?: boolean; |
| 24 | actorGrabMap: Map<Clutter.Actor, boolean | Clutter.Grab> = new Map(); |
| 25 | constructor(msWindowManager: MsWindowManagerType) { |
| 26 | super(); |
| 27 | this.msWindowManager = msWindowManager; |
| 28 | this.observe( |
| 29 | global.stage, |
| 30 | 'notify::key-focus', |
| 31 | this.onKeyFocus.bind(this) |
| 32 | ); |
| 33 | |
| 34 | this.observe( |
| 35 | global.display, |
| 36 | 'notify::focus-window', |
| 37 | this.onWindowFocus.bind(this) |
| 38 | ); |
| 39 | |
| 40 | this.observe( |
| 41 | global.workspace_manager, |
| 42 | 'active-workspace-changed', |
| 43 | () => { |
| 44 | if (!Me.instance.loaded) return; |
| 45 | this.focusProtected = true; |
| 46 | Async.addTimeout(GLib.PRIORITY_DEFAULT, 100, () => { |
| 47 | delete this.focusProtected; |
| 48 | return GLib.SOURCE_REMOVE; |
| 49 | }); |
| 50 | } |
| 51 | ); |
| 52 | } |
| 53 | |
| 54 | onKeyFocus(): void { |
| 55 | const keyFocus = global.stage.key_focus; |
nothing calls this directly
no test coverage detected