MCPcopy Index your code
hub / github.com/paperwm/PaperWM / _activateTarget

Method _activateTarget

stackoverlay.js:218–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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.

Callers 2

constructorMethod · 0.95
triggerPreviewMethod · 0.95

Calls 3

removePreviewMethod · 0.95
_pointerIsAtEdgeMethod · 0.95
triggerPreviewMethod · 0.95

Tested by

no test coverage detected