Skip to content

Commit

Permalink
Allowed for negative screen coordinates when using mousewheel
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Dec 9, 2012
1 parent efe3a11 commit b1ea797
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mushview.cpp
Expand Up @@ -5015,6 +5015,9 @@ BOOL CMUSHView::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
CMUSHclientDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);

// allow for negative values, eg. on second monitors
pt.x = (int) (short) pt.x;
pt.y = (int) (short) pt.y;

CRect rect;

Expand Down
4 changes: 4 additions & 0 deletions sendvw.cpp
Expand Up @@ -2695,6 +2695,10 @@ BOOL CSendView::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
{
CRect rect;

// allow for negative values, eg. on second monitors
pt.x = (int) (short) pt.x;
pt.y = (int) (short) pt.y;

m_topview->GetClientRect (&rect);
m_topview->ClientToScreen(&rect);

Expand Down

0 comments on commit b1ea797

Please sign in to comment.