diff options
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 42b620fe..b0e1fcb3 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1106,6 +1106,21 @@ wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::vector< return nullptr; } +SIMEPopup* CCompositor::vectorToIMEPopup(const Vector2D& pos, std::list<SIMEPopup>& popups) { + for (auto& popup : popups) { + auto surface = popup.pSurface->surface; + CBox box{ + popup.realX, + popup.realY, + surface->current.width, + surface->current.height, + }; + if (box.containsPoint(pos)) + return &popup; + } + return nullptr; +} + CWindow* CCompositor::getWindowFromSurface(wlr_surface* pSurface) { for (auto& w : m_vWindows) { if (!w->m_bIsMapped || w->m_bFadingOut || !w->m_bMappedX11) |
