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

Function activateWindowUnderCursor

tiling.js:5076–5083  ·  view source on GitHub ↗
(metaWindow, space)

Source from the content-addressed store, hash-verified

5074 * Activates the window under the mouse cursor, if any.
5075 */
5076export function activateWindowUnderCursor(metaWindow, space) {
5077 const [gx, gy] = global.get_pointer();
5078 const [, x, y] = space.actor.transform_stage_point(gx, gy);
5079 const mw = space?.getWindowAtPoint(x, y);
5080 if (mw) {
5081 ensureViewport(mw, space);
5082 }
5083}
5084
5085/**
5086 * Sets the focus mode for a space.

Callers

nothing calls this directly

Calls 2

ensureViewportFunction · 0.85
getWindowAtPointMethod · 0.80

Tested by

no test coverage detected