MCPcopy Create free account
hub / github.com/Sonic-DE/sonic-win / windowAt

Method windowAt

src/scripting/workspace_wrapper.cpp:309–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309QList<KWin::Window *> WorkspaceWrapper::windowAt(const QPointF &pos, int count) const
310{
311 QList<KWin::Window *> result;
312 int found = 0;
313 const QList<Window *> &stacking = workspace()->stackingOrder();
314 if (stacking.isEmpty()) {
315 return result;
316 }
317 auto it = stacking.end();
318 do {
319 if (found == count) {
320 return result;
321 }
322 --it;
323 Window *window = (*it);
324 if (window->isDeleted()) {
325 continue;
326 }
327 if (!window->isOnCurrentActivity() || !window->isOnCurrentDesktop() || window->isMinimized() || window->isHidden() || window->isHiddenByShowDesktop()) {
328 continue;
329 }
330 if (window->hitTest(pos)) {
331 result.append(window);
332 found++;
333 }
334 } while (it != stacking.begin());
335 return result;
336}
337
338bool WorkspaceWrapper::isEffectActive(const QString &pluginId) const
339{

Callers

nothing calls this directly

Calls 12

workspaceFunction · 0.85
isDeletedMethod · 0.80
isHiddenMethod · 0.80
isHiddenByShowDesktopMethod · 0.80
appendMethod · 0.80
beginMethod · 0.80
stackingOrderMethod · 0.45
isEmptyMethod · 0.45
endMethod · 0.45
isOnCurrentActivityMethod · 0.45
isOnCurrentDesktopMethod · 0.45
hitTestMethod · 0.45

Tested by

no test coverage detected