()
| 52 | } |
| 53 | |
| 54 | onKeyFocus(): void { |
| 55 | const keyFocus = global.stage.key_focus; |
| 56 | if (!keyFocus) { |
| 57 | if ( |
| 58 | this.focusProtected && |
| 59 | this.lastKeyFocus && |
| 60 | this.lastKeyFocus != this.lastMsWindowFocused && |
| 61 | this.lastKeyFocus.mapped |
| 62 | ) { |
| 63 | Debug.logFocus( |
| 64 | 'Focus Protected, restore focus to ', |
| 65 | this.lastKeyFocus |
| 66 | ); |
| 67 | |
| 68 | return this.lastKeyFocus.grab_key_focus(); |
| 69 | } |
| 70 | return; |
| 71 | } |
| 72 | |
| 73 | this.lastKeyFocus = keyFocus; |
| 74 | |
| 75 | let actor: Clutter.Actor | null = keyFocus; |
| 76 | while (actor !== null) { |
| 77 | if (actor instanceof MsWindow) { |
| 78 | this.setFocusToMsWindow(actor); |
| 79 | return; |
| 80 | } |
| 81 | actor = actor.get_parent(); |
| 82 | } |
| 83 | |
| 84 | if (keyFocus != Main.layoutManager.uiGroup) { |
| 85 | this.lastMsWindowFocused = null; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | onWindowFocus(): void { |
| 90 | const windowFocus = |
nothing calls this directly
no test coverage detected