Explorar o código

Don't use negative cursor positions from AttachThreadInput

ScottBrogden %!s(int64=9) %!d(string=hai) anos
pai
achega
9b369f052d
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  1. 10 2
      ExternalWindowTracker.cpp

+ 10 - 2
ExternalWindowTracker.cpp

@@ -437,8 +437,16 @@ CPoint ExternalWindowTracker::FocusCaret()
 				BOOL ret = GetCaretPos(&pt);
 				if(ret  && (pt.x > 0 || pt.y > 0))
 				{
-					ClientToScreen(m_focusWnd, &pt);
-					pt.y += 20;
+					::ClientToScreen(m_focusWnd, &pt);
+					if (pt.y > 0 && pt.x > 0)
+					{
+						pt.y += 20;
+					}
+					else
+					{
+						pt.x = 0;
+						pt.y = 0;
+					}
 				}
 
 				AttachThreadInput(GetWindowThreadProcessId(m_activeWnd, NULL), GetCurrentThreadId(), FALSE);