[client,windows] Fix return value checks for mouse event functions

This commit is contained in:
tsz8899
2026-02-08 20:27:38 +08:00
parent 5c7aae27d0
commit ed371b216a

View File

@@ -936,7 +936,8 @@ static BOOL wf_scale_mouse_event(wfContext* wfc, UINT16 flags, INT32 x, INT32 y)
if (!wf_scale_mouse_pos(wfc, x, y, &px, &py))
return FALSE;
if (freerdp_client_send_button_event(&wfc->common, FALSE, flags, px, py))
/* Fix: correct return value check (TRUE means success). */
if (!freerdp_client_send_button_event(&wfc->common, FALSE, flags, px, py))
return FALSE;
return wf_pub_mouse_event(wfc, flags, px, py);
@@ -959,7 +960,8 @@ static BOOL wf_scale_mouse_event_ex(wfContext* wfc, UINT16 flags, UINT16 buttonM
if (!wf_scale_mouse_pos(wfc, x, y, &px, &py))
return FALSE;
if (freerdp_client_send_extended_button_event(&wfc->common, FALSE, flags, px, py))
/* Fix: correct return value check for extended mouse events. */
if (!freerdp_client_send_extended_button_event(&wfc->common, FALSE, flags, px, py))
return FALSE;
return wf_pub_mouse_event(wfc, flags, px, py);