Attempt to fix problems with multimon windows. The mouse position

reported by the synergy hook dll is in a space with 0,0 in the
upper-left which is not necessarily the same as the virtual desktop
space.  So the windows primary screen now accounts for that.  On
the secondary screen, mouse_event() doesn't seem to accept negative
coordinates even on the windows NT family, making monitors with
negative coordinates inaccessible via absolute moves.  So if the
move will be to negative coordinates, use the windows 95 family
fallback of absolute moving to 0,0 then relative moving to the
final position.
This commit is contained in:
crs
2003-01-11 14:01:44 +00:00
parent 6c1344a0d8
commit 1758ea6f9f
2 changed files with 30 additions and 2 deletions

View File

@@ -310,8 +310,15 @@ CMSWindowsPrimaryScreen::onPreDispatch(const CEvent* event)
m_y = static_cast<SInt32>(msg->lParam);
if (!isActive()) {
// shift by origin of virtual screen. the synergy
// hook DLL does not account for
SInt32 w, h;
m_screen->getShape(x, y, w, h);
x += m_x;
y += m_y;
// motion on primary screen
m_receiver->onMouseMovePrimary(m_x, m_y);
m_receiver->onMouseMovePrimary(x, y);
}
else {
// motion on secondary screen. warp mouse back to