diff options
author | nyamatongwe <unknown> | 2011-11-17 09:17:21 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-11-17 09:17:21 +1100 |
commit | 8eda5392b9e445f20b0f615c3aaba88b4fa175e8 (patch) | |
tree | 56c74dbd573bce0e589163609af100f1b5de6356 | |
parent | 729aa9d537ac1696806563ddb9c1c9779e31927e (diff) | |
download | scintilla-mirror-8eda5392b9e445f20b0f615c3aaba88b4fa175e8.tar.gz |
::GetCursorPos failure with screen saver handled. Bug #3438780.
From Thomas Linder Puls.
-rw-r--r-- | win32/ScintillaWin.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 39ac139af..73e8736fd 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -886,16 +886,17 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam } else { // Display regular (drag) cursor over selection POINT pt; - ::GetCursorPos(&pt); - ::ScreenToClient(MainHWND(), &pt); - if (PointInSelMargin(Point(pt.x, pt.y))) { - DisplayCursor(GetMarginCursor(Point(pt.x, pt.y))); - } else if (PointInSelection(Point(pt.x, pt.y)) && !SelectionEmpty()) { - DisplayCursor(Window::cursorArrow); - } else if (PointIsHotspot(Point(pt.x, pt.y))) { - DisplayCursor(Window::cursorHand); - } else { - DisplayCursor(Window::cursorText); + if (0 != ::GetCursorPos(&pt)) { + ::ScreenToClient(MainHWND(), &pt); + if (PointInSelMargin(Point(pt.x, pt.y))) { + DisplayCursor(GetMarginCursor(Point(pt.x, pt.y))); + } else if (PointInSelection(Point(pt.x, pt.y)) && !SelectionEmpty()) { + DisplayCursor(Window::cursorArrow); + } else if (PointIsHotspot(Point(pt.x, pt.y))) { + DisplayCursor(Window::cursorHand); + } else { + DisplayCursor(Window::cursorText); + } } } return TRUE; |