()
| 216 | } |
| 217 | |
| 218 | _activateTarget() { |
| 219 | Main.activateWindow(this.target); |
| 220 | // remove/cleanup the previous preview |
| 221 | this.removePreview(); |
| 222 | |
| 223 | // if pointer is still at edge (within 2px), trigger preview |
| 224 | this.triggerPreviewTimeout = GLib.timeout_add( |
| 225 | GLib.PRIORITY_DEFAULT, |
| 226 | (Settings.prefs.animation_time * 1000) + 50, |
| 227 | () => { |
| 228 | if (this._pointerIsAtEdge()) { |
| 229 | this.triggerPreview(true); |
| 230 | } |
| 231 | |
| 232 | this.triggerPreviewTimeout = null; |
| 233 | return false; // on return false destroys timeout |
| 234 | }); |
| 235 | } |
| 236 | |
| 237 | /** |
| 238 | * Returns true if pointer x position is at monitor edge. |
no test coverage detected