mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 03:29:48 +01:00
wl_seat: accomodate for apps late-binding seat resources
Sends enter events when an app binds wl_keyboard or wl_pointer later than it should. Fixes some buggy apps. Fixes #6131
This commit is contained in:
parent
648ac8a00b
commit
d0a6fa7aa6
1 changed files with 6 additions and 0 deletions
|
@ -98,6 +98,9 @@ CWLPointerResource::CWLPointerResource(SP<CWlPointer> resource_, SP<CWLSeatResou
|
|||
|
||||
g_pSeatManager->onSetCursor(owner.lock(), serial, surf ? CWLSurfaceResource::fromResource(surf) : nullptr, {hotX, hotY});
|
||||
});
|
||||
|
||||
if (g_pSeatManager->state.pointerFocus && g_pSeatManager->state.pointerFocus->client() == resource->client())
|
||||
sendEnter(g_pSeatManager->state.pointerFocus.lock(), {-1, -1} /* Coords don't really matter that much, they will be updated next move */);
|
||||
}
|
||||
|
||||
bool CWLPointerResource::good() {
|
||||
|
@ -207,6 +210,9 @@ CWLKeyboardResource::CWLKeyboardResource(SP<CWlKeyboard> resource_, SP<CWLSeatRe
|
|||
|
||||
sendKeymap(g_pSeatManager->keyboard.lock());
|
||||
repeatInfo(g_pSeatManager->keyboard->repeatRate, g_pSeatManager->keyboard->repeatDelay);
|
||||
|
||||
if (g_pSeatManager->state.keyboardFocus && g_pSeatManager->state.keyboardFocus->client() == resource->client())
|
||||
sendEnter(g_pSeatManager->state.keyboardFocus.lock());
|
||||
}
|
||||
|
||||
bool CWLKeyboardResource::good() {
|
||||
|
|
Loading…
Reference in a new issue