From decb2f638d875900c859d968726d5941058095e8 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 20 Mar 2022 14:00:46 +0100 Subject: popups handled properly --- src/Compositor.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/Compositor.cpp') 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 -- cgit v1.2.3