mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 15:41:58 -07:00
input: pass mouse input to IME popups (#3922)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user