summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index baa098b0..9636be9d 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -322,6 +322,15 @@ SLayerSurface* CCompositor::getLayerForPopup(SLayerPopup* pPopup) {
}
}
}
-
+
return CurrentPopup->parentSurface;
+}
+
+CWindow* CCompositor::getWindowForPopup(wlr_xdg_popup* popup) {
+ for (auto& p : m_lXDGPopups) {
+ if (p.popup == popup)
+ return p.parentWindow;
+ }
+
+ return nullptr;
} \ No newline at end of file