MCPcopy Create free account
hub / github.com/deskflow/deskflow / getThisCursorPos

Method getThisCursorPos

src/lib/platform/MSWindowsScreen.cpp:448–464  ·  view source on GitHub ↗

* getThisCursorPos and setThisCursorPos will attempt to negotiate with the * system to try get the and set the mouse position, however on the logon screen * due to hooks this process has it may unable to work around the problem. * Although these functions did not fix the issue at hand (#5294) its worth * keeping them here anyway. */

Source from the content-addressed store, hash-verified

446 * keeping them here anyway.
447 */
448bool MSWindowsScreen::getThisCursorPos(LPPOINT pos)
449{
450 auto result = GetCursorPos(pos);
451 if (!result) {
452 LOG_DEBUG("could not get cursor pos, error: %s", windowsErrorToString(GetLastError()).c_str());
453
454 LOG_DEBUG("retrying get cursor pos");
455 result = GetCursorPos(pos);
456 if (!result) {
457 LOG_DEBUG("could not get cursor pos, error: %s", windowsErrorToString(GetLastError()).c_str());
458
459 updateDesktopThread();
460 }
461 }
462
463 return result;
464}
465
466bool MSWindowsScreen::setThisCursorPos(int x, int y)
467{

Callers

nothing calls this directly

Calls 1

windowsErrorToStringFunction · 0.85

Tested by

no test coverage detected