diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-01 23:11:09 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-01 23:11:09 +0200 |
| commit | cd62eb56249d9db6b3bb33aacdd578c8c162e3ae (patch) | |
| tree | 8e6db697e9e4b6919f5eaef1aa9f0a3299491890 /src/managers/InputManager.cpp | |
| parent | a64943fd12a65fb265e5aed49a0da315947cf31a (diff) | |
Fixed XWayland (GTK/?) popups focus
Diffstat (limited to 'src/managers/InputManager.cpp')
| -rw-r--r-- | src/managers/InputManager.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp index 10b1ad95..20ee8041 100644 --- a/src/managers/InputManager.cpp +++ b/src/managers/InputManager.cpp @@ -23,7 +23,6 @@ void CInputManager::mouseMoveUnified(uint32_t time) { // update stuff updateDragIcon(); - // focus wlr_surface* foundSurface = nullptr; Vector2D mouseCoords = getMouseCoordsInternal(); @@ -66,11 +65,10 @@ void CInputManager::mouseMoveUnified(uint32_t time) { foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_TOP], &surfaceCoords); // then windows - const auto PWINDOWIDEAL = g_pCompositor->vectorToWindowIdeal(mouseCoords); - if (!foundSurface && PWINDOWIDEAL) { - foundSurface = g_pXWaylandManager->getWindowSurface(PWINDOWIDEAL); - if (foundSurface) - surfacePos = PWINDOWIDEAL->m_vRealPosition; + const auto PWINDOWIDEAL = g_pCompositor->vectorToWindowIdealExcludeWithSurface(mouseCoords, nullptr, &foundSurface); + + if (foundSurface && PWINDOWIDEAL) { + surfacePos = PWINDOWIDEAL->m_vRealPosition; } // then surfaces below @@ -124,8 +122,6 @@ void CInputManager::onMouseButton(wlr_pointer_button_event* e) { break; } - refocus(); - // notify app if we didnt handle it if (g_pCompositor->doesSeatAcceptInput(g_pCompositor->m_pLastFocus)) { wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, e->time_msec, e->button, e->state); |
