diff options
| author | Junxuan Liao <70618504+MikeWalrus@users.noreply.github.com> | 2023-11-25 22:27:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-25 14:27:57 +0000 |
| commit | 929c44e361fe5cc535a9226b05fba21a0e317d69 (patch) | |
| tree | 92d55697604d7b80715f7c1c5f3898c58147f960 /src/Compositor.cpp | |
| parent | 512a59731b2e579b66325d0e9ce770919eecd685 (diff) | |
input: pass mouse input to IME popups (#3922)
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) |
