diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-03-14 18:25:28 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-03-14 18:25:28 +0000 |
| commit | 164e92f8e376536fff89dac41cde654293e64522 (patch) | |
| tree | 2441ec753b92a6fd6f7d22aa341a307ed19dba76 /src/Window.cpp | |
| parent | 3e67ee0f5f66c74c0a0bd4f797361fd100c2e2d2 (diff) | |
internal: minor fixups for fading out xwayland windows
fixes #4935
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index 4c8ff509..06b71763 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -1137,3 +1137,9 @@ void CWindow::setSuspended(bool suspend) { wlr_xdg_toplevel_set_suspended(m_uSurface.xdg->toplevel, suspend); m_bSuspended = suspend; } + +bool CWindow::visibleOnMonitor(CMonitor* pMonitor) { + CBox wbox = {m_vRealPosition.value(), m_vRealSize.value()}; + + return wlr_output_layout_intersects(g_pCompositor->m_sWLROutputLayout, pMonitor->output, wbox.pWlr()); +} |
