Re-enable cursor clipping when clicking into a window when relative mouse mode is enabled

This commit is contained in:
Sam Lantinga
2024-04-03 12:40:28 -07:00
parent 2d9aff6433
commit a8ed32c5f7

View File

@@ -621,6 +621,18 @@ static void WIN_HandleRawMouseInput(Uint64 timestamp, SDL_VideoData *data, HANDL
button = SDL_BUTTON_LEFT;
}
}
if (windowdata->focus_click_pending & SDL_BUTTON(button)) {
/* Ignore the button click for activation */
if (!state) {
windowdata->focus_click_pending &= ~SDL_BUTTON(button);
WIN_UpdateClipCursor(window);
}
if (WIN_ShouldIgnoreFocusClick(windowdata)) {
continue;
}
}
SDL_SendMouseButton(timestamp, window, mouseID, state, button);
}
}