From 398c351371b7f1bacea3b898729a4723acc6f417 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Fri, 3 Mar 2017 15:32:47 -0800 Subject: First pass at osx/macos keyboard events - simple case like google homepage is working --- indra/llwindow/llwindowmacosx.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 754306b5d2..d28a7f177f 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1758,7 +1758,7 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async) LLSD LLWindowMacOSX::getNativeKeyData() { LLSD result = LLSD::emptyMap(); -#if 1 + if(mRawKeyEvent) { result["event_type"] = LLSD::Integer(mRawKeyEvent->mEventType); @@ -1768,7 +1768,6 @@ LLSD LLWindowMacOSX::getNativeKeyData() result["event_umodchars"] = (mRawKeyEvent->mEventUnmodChars) ? LLSD(LLSD::Integer(mRawKeyEvent->mEventUnmodChars)) : LLSD(); result["event_isrepeat"] = LLSD::Boolean(mRawKeyEvent->mEventRepeat); } -#endif LL_DEBUGS() << "native key data is: " << result << LL_ENDL; -- cgit v1.2.3 From 09003cf4055fc336cf12e075636f1dfe8ce035d2 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 27 Mar 2017 10:59:19 -0700 Subject: Fix for MAINT-7054 Viewer Crashed when I used Japanese IM. --- indra/llwindow/llwindowwin32.cpp | 4 ++-- indra/llwindow/llwindowwin32.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 301ae7f9c4..47441db669 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2201,7 +2201,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ if (LLWinImm::isAvailable() && window_imp->mPreeditor) { LRESULT result = 0; - if (window_imp->handleImeRequests(w_param, l_param, &result)) + if (window_imp->handleImeRequests(w_param, (LONG_PTR)l_param, &result)) { return result; } @@ -3800,7 +3800,7 @@ LLWindowCallbacks::DragNDropResult LLWindowWin32::completeDragNDropRequest( cons // When it handled the message, the value to be returned from // the Window Procedure is set to *result. -BOOL LLWindowWin32::handleImeRequests(U32 request, U32 param, LRESULT *result) +BOOL LLWindowWin32::handleImeRequests(U32 request, LONG_PTR param, LRESULT *result) { if ( mPreeditor ) { diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 39ef9b31a4..65782acb62 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -148,7 +148,7 @@ protected: U32 fillReconvertString(const LLWString &text, S32 focus, S32 focus_length, RECONVERTSTRING *reconvert_string); void handleStartCompositionMessage(); void handleCompositionMessage(U32 indexes); - BOOL handleImeRequests(U32 request, U32 param, LRESULT *result); + BOOL handleImeRequests(U32 request, LONG_PTR param, LRESULT *result); protected: // -- cgit v1.2.3 From 6d4c737b789714aaff44b7231dd923bb7b99b702 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 27 Mar 2017 16:20:51 -0700 Subject: Additional work on : Fix for MAINT-7054 Viewer Crashed when I used Japanese IM. (Drake and Appurist convinced me my initial solution was non-optimal) --- indra/llwindow/llwindowwin32.cpp | 4 ++-- indra/llwindow/llwindowwin32.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 47441db669..5ec0ada6eb 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2201,7 +2201,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ if (LLWinImm::isAvailable() && window_imp->mPreeditor) { LRESULT result = 0; - if (window_imp->handleImeRequests(w_param, (LONG_PTR)l_param, &result)) + if (window_imp->handleImeRequests(w_param, l_param, &result)) { return result; } @@ -3800,7 +3800,7 @@ LLWindowCallbacks::DragNDropResult LLWindowWin32::completeDragNDropRequest( cons // When it handled the message, the value to be returned from // the Window Procedure is set to *result. -BOOL LLWindowWin32::handleImeRequests(U32 request, LONG_PTR param, LRESULT *result) +BOOL LLWindowWin32::handleImeRequests(WPARAM request, LPARAM param, LRESULT *result) { if ( mPreeditor ) { diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 65782acb62..059a008c45 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -148,7 +148,7 @@ protected: U32 fillReconvertString(const LLWString &text, S32 focus, S32 focus_length, RECONVERTSTRING *reconvert_string); void handleStartCompositionMessage(); void handleCompositionMessage(U32 indexes); - BOOL handleImeRequests(U32 request, LONG_PTR param, LRESULT *result); + BOOL handleImeRequests(WPARAM request, LPARAM param, LRESULT *result); protected: // -- cgit v1.2.3