fix pointer focus coords in focusWindow

This commit is contained in:
vaxerski 2022-04-14 21:30:18 +02:00
parent d1e5f87607
commit e4d05c90ce

View file

@ -380,8 +380,9 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
g_pXWaylandManager->activateWindow(pWindow, true);
// do pointer focus too
wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, 0, 0);
// do pointer focus too
const auto POINTERLOCAL = g_pInputManager->getMouseCoordsInternal() - pWindow->m_vRealPosition;
wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, POINTERLOCAL.x, POINTERLOCAL.y);
m_pLastWindow = pWindow;
}