When resizing a window with window snapping enabled, KWin considers, e.g., windows from other activities as snapping target although they are currently invisible. This does not occur when a window is repositioned instead of resized. In the source code, AFAIS, the snapping implementations for repositioning and resizing employ very different filters to determine potential snapping targets (see `src/workspace.cpp`): ```C++ QPoint Workspace::adjustClientPosition(AbstractClient* c, QPoint pos, bool unrestricted, double snapAdjust) { // […] for (auto l = m_allClients.constBegin(); l != m_allClients.constEnd(); ++l) { if ((*l) == c) continue; if ((*l)->isMinimized() || (*l)->isShade()) continue; if (!(*l)->isShown()) continue; if (!(*l)->isOnCurrentDesktop()) continue; // wrong virtual desktop if (!(*l)->isOnCurrentActivity()) continue; // wrong activity if ((*l)->isDesktop() || (*l)->isSplash() || (*l)->isNotification() || (*l)->isCriticalNotification() || (*l)->isOnScreenDisplay()) continue; // [adapt position] […] QRect Workspace::adjustClientSize(AbstractClient* c, QRect moveResizeGeom, Gravity gravity) { // […] for (auto l = m_allClients.constBegin(); l != m_allClients.constEnd(); ++l) { if ((*l)->isOnCurrentDesktop() && !(*l)->isMinimized() && (*l) != c) { // [adapt size] […] ```
Nice catch, feel free to submit a merge request to fix this.