[client] input: use absolute transport positioning

This commit is contained in:
Geoffrey McRae
2026-08-09 01:23:30 +10:00
parent 27a938e741
commit 3e38c62050
5 changed files with 104 additions and 7 deletions

View File

@@ -139,6 +139,8 @@ void app_updateCursorPos(double x, double y)
if (app_isOverlayMode())
g_state.io->MousePos = (ImVec2) { x, y };
else
core_handleMouseAbsolute();
}
void app_updateMouseState(void)
@@ -267,6 +269,7 @@ void app_handleEnterEvent(bool entered)
return;
g_cursor.realign = true;
core_handleMouseAbsolute();
}
else
{
@@ -471,6 +474,7 @@ void app_handleButtonPress(int button)
if (!core_inputEnabled() || !g_cursor.inView || !g_cursor.viewReq)
return;
core_handleMouseAbsolute();
if (!lgInput_mousePress(button))
DEBUG_ERROR("app_handleButtonPress: failed to send message");
}
@@ -662,6 +666,9 @@ void app_handleMouseBasic(void)
if (!core_inputEnabled())
return;
if (lgInput_supports(LG_INPUT_SUPPORT_MOUSE_ABSOLUTE))
return;
const bool inView =
g_cursor.pos.x >= g_state.dstRect.x &&
g_cursor.pos.x < g_state.dstRect.x + g_state.dstRect.w &&