wayland: Cleanup work to aid reconnect support

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>
This commit is contained in:
Ethan Lee
2022-10-29 22:34:05 -04:00
parent f6b1e028ab
commit 9c8b1fd8b6
7 changed files with 167 additions and 36 deletions

View File

@@ -266,6 +266,30 @@ SDL_GetMouseFocus(void)
return mouse->focus;
}
/* TODO RECONNECT: Hello from the Wayland video driver!
* This was once removed from SDL, but it's been added back in comment form
* because we will need it when Wayland adds compositor reconnect support.
* If you need this before we do, great! Otherwise, leave this alone, we'll
* uncomment it at the right time.
* -flibit
*/
#if 0
void
SDL_ResetMouse(void)
{
SDL_Mouse *mouse = SDL_GetMouse();
Uint32 buttonState = GetButtonState(mouse, SDL_FALSE);
int i;
for (i = 1; i <= sizeof(buttonState)*8; ++i) {
if (buttonState & SDL_BUTTON(i)) {
SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_RELEASED, i);
}
}
SDL_assert(GetButtonState(mouse, SDL_FALSE) == 0);
}
#endif /* 0 */
void
SDL_SetMouseFocus(SDL_Window * window)
{