mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[client,sdl] wrap mouse cursor move in SdlContext
This commit is contained in:
@@ -840,6 +840,18 @@ wLog* SdlContext::getWLog()
|
||||
return _log;
|
||||
}
|
||||
|
||||
bool SdlContext::moveMouseTo(const SDL_FPoint& pos)
|
||||
{
|
||||
auto window = SDL_GetMouseFocus();
|
||||
if (!window)
|
||||
return true;
|
||||
|
||||
const auto id = SDL_GetWindowID(window);
|
||||
const auto spos = pixelToScreen(id, pos);
|
||||
SDL_WarpMouseInWindow(window, spos.x, spos.y);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SdlContext::handleEvent(const SDL_WindowEvent* ev)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user