summaryrefslogtreecommitdiff
path: root/src/desktop/WLSurface.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2024-07-27 15:03:52 +0200
committervaxerski <vaxry@vaxry.net>2024-07-27 15:04:03 +0200
commit963816b9a6524a99a6716fa1aa30b2c4f369d2f0 (patch)
tree84cc5b6e4a92e22070343a3d87628891dbbb3e89 /src/desktop/WLSurface.cpp
parent534fdb5a375b65821adce3fec5d1622fc546b8b4 (diff)
layersurface: fixup focus issues in onUnmap
fixes #6929
Diffstat (limited to 'src/desktop/WLSurface.cpp')
-rw-r--r--src/desktop/WLSurface.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/desktop/WLSurface.cpp b/src/desktop/WLSurface.cpp
index 90924145..e1348a90 100644
--- a/src/desktop/WLSurface.cpp
+++ b/src/desktop/WLSurface.cpp
@@ -1,6 +1,7 @@
#include "WLSurface.hpp"
#include "../Compositor.hpp"
#include "../protocols/core/Compositor.hpp"
+#include "../protocols/LayerShell.hpp"
void CWLSurface::assign(SP<CWLSurfaceResource> pSurface) {
m_pResource = pSurface;
@@ -222,3 +223,11 @@ SP<CWLSurface> CWLSurface::fromResource(SP<CWLSurfaceResource> pSurface) {
return nullptr;
return pSurface->hlSurface.lock();
}
+
+bool CWLSurface::keyboardFocusable() const {
+ if (m_pWindowOwner || m_pPopupOwner || m_pSubsurfaceOwner)
+ return true;
+ if (m_pLayerOwner)
+ return m_pLayerOwner->layerSurface->current.interactivity != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE;
+ return false;
+}