This commit is contained in:
Maxim Andreev 2026-05-07 00:26:10 +01:00 committed by GitHub
commit 6ebb49a91e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -176,6 +176,16 @@ void CInputManager::sendMotionEventsToFocused() {
if (!Desktop::focusState()->surface() || isConstrained())
return;
const auto POINTERSURF = g_pSeatManager->m_state.pointerFocus.lock();
if (POINTERSURF) {
const auto POINTERHLSURF = Desktop::View::CWLSurface::fromResource(POINTERSURF);
// Keep pointer focus on desktop components such as bars or popups that are
// currently under the cursor. Keyboard focus changes should not steal it.
if (POINTERHLSURF && (!POINTERHLSURF->view() || POINTERHLSURF->view()->type() != Desktop::View::VIEW_TYPE_WINDOW))
return;
}
const auto SURF = Desktop::focusState()->surface();
if (!SURF)