MCPcopy Create free account
hub / github.com/KDE/kwin / windowAt

Method windowAt

src/scripting/workspace_wrapper.cpp:369–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367#endif
368
369QList<KWin::Window *> WorkspaceWrapper::windowAt(const QPointF &pos, int count) const
370{
371 QList<KWin::Window *> result;
372 int found = 0;
373 const QList<Window *> &stacking = workspace()->stackingOrder();
374 if (stacking.isEmpty()) {
375 return result;
376 }
377 auto it = stacking.end();
378 do {
379 if (found == count) {
380 return result;
381 }
382 --it;
383 Window *window = (*it);
384 if (window->isDeleted()) {
385 continue;
386 }
387 if (!window->isOnCurrentActivity() || !window->isOnCurrentDesktop() || window->isMinimized() || window->isHidden() || window->isHiddenByShowDesktop()) {
388 continue;
389 }
390 if (window->hitTest(pos)) {
391 result.append(window);
392 found++;
393 }
394 } while (it != stacking.begin());
395 return result;
396}
397
398bool WorkspaceWrapper::isEffectActive(const QString &pluginId) const
399{

Callers

nothing calls this directly

Calls 12

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

Tested by

no test coverage detected