diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-04-07 13:15:10 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-07 12:07:36 -0400 |
| commit | 8a97b11b22422bcb6907a66010388856317c7ff5 (patch) | |
| tree | fe9ff326b0ae440de812bbfc2d3d61d400bd3c7e /src/Compositor.cpp | |
| parent | 10c8a863d271dac1c51af73e0e7fb23784b6c13d (diff) | |
desktop/popup: cache popup extents
caches popup extents in the head to avoid potentially expensive traversals
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 2a9b0947..d6a226b8 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -922,7 +922,7 @@ PHLWINDOW CCompositor::vectorToWindowUnified(const Vector2D& pos, uint8_t proper w != pIgnoreWindow && !isShadowedByModal(w)) { const auto BB = w->getWindowBoxUnified(properties); CBox box = BB.copy().expand(!w->isX11OverrideRedirect() ? BORDER_GRAB_AREA : 0); - if (box.containsPoint(g_pPointerManager->position())) + if (box.containsPoint(pos)) return w; if (!w->m_isX11) { @@ -964,7 +964,7 @@ PHLWINDOW CCompositor::vectorToWindowUnified(const Vector2D& pos, uint8_t proper const auto BB = w->getWindowBoxUnified(properties); CBox box = BB.copy().expand(!w->isX11OverrideRedirect() ? BORDER_GRAB_AREA : 0); - if (box.containsPoint(g_pPointerManager->position())) { + if (box.containsPoint(pos)) { if (w->m_isX11 && w->isX11OverrideRedirect() && !w->m_xwaylandSurface->wantsFocus()) { // Override Redirect |
