Changeset 2762 for trunk


Ignore:
Timestamp:
Aug 13, 2006, 2:01:46 AM (19 years ago)
Author:
bird
Message:

quick and dirty mouse motion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/synergy/lib/platform/CPMScreen.cpp

    r2761 r2762  
    8686    //}
    8787        if (m_hab == NULLHANDLE || m_hmq == NULLHANDLE) {
    88                 LOG((CLOG_CRIT "couldn't get the hab(%ld)/hmq(%ld) of the current thread! %d\n", m_hab, m_hmq));
     88                LOG((CLOG_CRIT "couldn't get the hab(%ld)/hmq(%ld) of the current thread! %d", m_hab, m_hmq));
    8989        delete eventQueue;
    9090                s_screen = NULL;
     
    537537CPMScreen::fakeMouseMove(SInt32 x, SInt32 y) const
    538538{
    539         //m_desks->fakeMouseMove(x, y);
     539    LOG((CLOG_DEBUG "fakeMouseMove: %d,%d (y=%d)", x, m_cy - y, y));
     540    if (WinSetPointerPos(HWND_DESKTOP, x, m_cy - y)) {
     541        return;
     542    }
     543    LOG((CLOG_CRIT "fakeMouseMove: failed %#lx", WinGetLastError(CPMUtil::getHAB())));
    540544}
    541545
     
    543547CPMScreen::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
    544548{
    545         //m_desks->fakeMouseRelativeMove(dx, dy);
     549    POINTL ptl;
     550    if (WinQueryPointerPos(HWND_DESKTOP, &ptl)) {
     551        LOG((CLOG_DEBUG "fakeMouseRelativeMove: %d,%d (%d,%d +/- %d,%d)", ptl.x + dx, ptl.y - dy, ptl.y, ptl.x, dx, dy));
     552        if (WinSetPointerPos(HWND_DESKTOP, ptl.x + dx, ptl.y - dy)) {
     553            return;
     554        }
     555    }
     556    LOG((CLOG_CRIT "fakeMouseRelativeMove: failed %#lx", WinGetLastError(CPMUtil::getHAB())));
    546557}
    547558
Note: See TracChangeset for help on using the changeset viewer.