summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorAaron Brashears <aaronb@lindenlab.com>2007-06-13 18:02:37 +0000
committerAaron Brashears <aaronb@lindenlab.com>2007-06-13 18:02:37 +0000
commitf118e7c80b95d8c0a0c8abb14ff379b6697e01b6 (patch)
treedb55a74f8d18b3c366608a537e2a32f6d089d56f /indra/llwindow/llwindowwin32.cpp
parent680667d4bdca7e2a6df15cd6f16f34c12c97da8e (diff)
result of merge manually performed through diff and patch. svn diff svn+ssh://svn/svn/linden/release@63615 svn+ssh://svn/svn/linden/branches/release-candidate@63637 | patch -p0 in release
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp49
1 files changed, 48 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index e6bce27ce2..095b2113a7 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -2052,7 +2052,54 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
break;
case WM_MBUTTONDOWN:
- // Handle middle button click
+// case WM_MBUTTONDBLCLK:
+ {
+ // Because we move the cursor position in tllviewerhe app, we need to query
+ // to find out where the cursor at the time the event is handled.
+ // If we don't do this, many clicks could get buffered up, and if the
+ // first click changes the cursor position, all subsequent clicks
+ // will occur at the wrong location. JC
+ LLCoordWindow cursor_coord_window;
+ if (window_imp->mMousePositionModified)
+ {
+ window_imp->getCursorPosition(&cursor_coord_window);
+ window_imp->convertCoords(cursor_coord_window, &gl_coord);
+ }
+ else
+ {
+ window_imp->convertCoords(window_coord, &gl_coord);
+ }
+ MASK mask = gKeyboard->currentMask(TRUE);
+ if (window_imp->mCallbacks->handleMiddleMouseDown(window_imp, gl_coord, mask))
+ {
+ return 0;
+ }
+ }
+ break;
+
+ case WM_MBUTTONUP:
+ {
+ // Because we move the cursor position in tllviewerhe app, we need to query
+ // to find out where the cursor at the time the event is handled.
+ // If we don't do this, many clicks could get buffered up, and if the
+ // first click changes the cursor position, all subsequent clicks
+ // will occur at the wrong location. JC
+ LLCoordWindow cursor_coord_window;
+ if (window_imp->mMousePositionModified)
+ {
+ window_imp->getCursorPosition(&cursor_coord_window);
+ window_imp->convertCoords(cursor_coord_window, &gl_coord);
+ }
+ else
+ {
+ window_imp->convertCoords(window_coord, &gl_coord);
+ }
+ MASK mask = gKeyboard->currentMask(TRUE);
+ if (window_imp->mCallbacks->handleMiddleMouseUp(window_imp, gl_coord, mask))
+ {
+ return 0;
+ }
+ }
break;
case WM_MOUSEWHEEL: