summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llmousehandler.h2
-rw-r--r--indra/llwindow/llwindowcallbacks.cpp10
-rw-r--r--indra/llwindow/llwindowcallbacks.h2
-rw-r--r--indra/llwindow/llwindowwin32.cpp64
4 files changed, 78 insertions, 0 deletions
diff --git a/indra/llwindow/llmousehandler.h b/indra/llwindow/llmousehandler.h
index d825a3424c..8e6fbdb4e3 100644
--- a/indra/llwindow/llmousehandler.h
+++ b/indra/llwindow/llmousehandler.h
@@ -50,6 +50,8 @@ public:
CLICK_LEFT,
CLICK_MIDDLE,
CLICK_RIGHT,
+ CLICK_BUTTON4,
+ CLICK_BUTTON5,
CLICK_DOUBLELEFT
} EClickType;
diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp
index 94c725fc7e..c01f574375 100644
--- a/indra/llwindow/llwindowcallbacks.cpp
+++ b/indra/llwindow/llwindowcallbacks.cpp
@@ -98,6 +98,16 @@ BOOL LLWindowCallbacks::handleMiddleMouseUp(LLWindow *window, const LLCoordGL po
return FALSE;
}
+BOOL LLWindowCallbacks::handleOtherMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask, S32 button)
+{
+ return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleOtherMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask, S32 button)
+{
+ return FALSE;
+}
+
BOOL LLWindowCallbacks::handleActivate(LLWindow *window, BOOL activated)
{
return FALSE;
diff --git a/indra/llwindow/llwindowcallbacks.h b/indra/llwindow/llwindowcallbacks.h
index 4d753024fe..9304446f8f 100644
--- a/indra/llwindow/llwindowcallbacks.h
+++ b/indra/llwindow/llwindowcallbacks.h
@@ -49,6 +49,8 @@ public:
virtual BOOL handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
virtual BOOL handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
virtual BOOL handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
+ virtual BOOL handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
+ virtual BOOL handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
virtual BOOL handleActivate(LLWindow *window, BOOL activated);
virtual BOOL handleActivateApp(LLWindow *window, BOOL activating);
virtual void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask);
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 66b8bf8aee..25286ee61c 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -2539,6 +2539,70 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
}
break;
+ case WM_XBUTTONDOWN:
+ {
+ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MBUTTONDOWN");
+ LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER);
+ S32 button = GET_XBUTTON_WPARAM(w_param);
+ if (LLWinImm::isAvailable() && window_imp->mPreeditor)
+ {
+ window_imp->interruptLanguageTextInput();
+ }
+
+ // 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
+ if (window_imp->mMousePositionModified)
+ {
+ LLCoordWindow cursor_coord_window;
+ window_imp->getCursorPosition(&cursor_coord_window);
+ gl_coord = cursor_coord_window.convert();
+ }
+ else
+ {
+ gl_coord = window_coord.convert();
+ }
+ MASK mask = gKeyboard->currentMask(TRUE);
+ // generate move event to update mouse coordinates
+ window_imp->mCallbacks->handleMouseMove(window_imp, gl_coord, mask);
+ if (window_imp->mCallbacks->handleOtherMouseDown(window_imp, gl_coord, mask, button))
+ {
+ return 0;
+ }
+ }
+ break;
+
+ case WM_XBUTTONUP:
+ {
+ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MBUTTONUP");
+ LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER);
+ S32 button = GET_XBUTTON_WPARAM(w_param);
+ // Because we move the cursor position in the llviewer 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
+ if (window_imp->mMousePositionModified)
+ {
+ LLCoordWindow cursor_coord_window;
+ window_imp->getCursorPosition(&cursor_coord_window);
+ gl_coord = cursor_coord_window.convert();
+ }
+ else
+ {
+ gl_coord = window_coord.convert();
+ }
+ MASK mask = gKeyboard->currentMask(TRUE);
+ // generate move event to update mouse coordinates
+ window_imp->mCallbacks->handleMouseMove(window_imp, gl_coord, mask);
+ if (window_imp->mCallbacks->handleOtherMouseUp(window_imp, gl_coord, mask, button))
+ {
+ return 0;
+ }
+ }
+ break;
case WM_MOUSEWHEEL:
{