diff options
Diffstat (limited to 'src/Window.cpp')
-rw-r--r-- | src/Window.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index 6b62b5c0..03ca39ad 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -244,3 +244,20 @@ void CWindow::removeDecorationByType(eDecorationType type) { updateWindowDecos(); } + +void CWindow::onUnmap() { + if (g_pCompositor->m_pLastWindow == this) + g_pCompositor->m_pLastWindow = nullptr; +} + +void CWindow::setHidden(bool hidden) { + m_bHidden = hidden; + + if (hidden) { + onUnmap(); + } +} + +bool CWindow::isHidden() { + return m_bHidden; +}
\ No newline at end of file |