From 572b8fc518ee45cdf5403f58b18e0000868696cb Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 19 Jan 2010 21:55:51 -0800 Subject: Changes to llqtwebkit keyboard event api. Reference to new mac build of llqtwebkit (from revision 5e61bf24915f in https://hg.lindenlab.com/monroe/llqtwebkit-4.6). --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install.xml') diff --git a/install.xml b/install.xml index ef24263972..81064c6306 100644 --- a/install.xml +++ b/install.xml @@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard darwin md5sum - 2eb58f544c0d912aa382de2c947be7f1 + 02d3d8171fff0c673f900f1d1a53046a url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20100104.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20100119.tar.bz2 linux -- cgit v1.3 From 80139d95adbcb2258c5541a4e0ace32f32b78ba5 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 4 Feb 2010 16:30:21 -0800 Subject: added code to grab raw key codes from Win32 WPARAM and LPARAM and send to plugin factored out keyboard message deserialization for media_plugin_webkit new version of llqtwebkit with Girish's changes to keyboard and cursor handling code --- indra/llwindow/llwindowwin32.cpp | 37 ++++++++++++++++++++++ indra/llwindow/llwindowwin32.h | 6 +++- indra/media_plugins/webkit/media_plugin_webkit.cpp | 37 ++++++++++++++-------- install.xml | 4 +-- 4 files changed, 67 insertions(+), 17 deletions(-) (limited to 'install.xml') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index b591111b75..1b9331e784 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -376,6 +376,9 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks, mMousePositionModified = FALSE; mInputProcessingPaused = FALSE; mPreeditor = NULL; + mKeyCharCode = 0; + mKeyScanCode = 0; + mKeyVirtualKey = 0; mhDC = NULL; mhRC = NULL; @@ -1858,6 +1861,10 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ // allow system keys, such as ALT-F4 to be processed by Windows eat_keystroke = FALSE; case WM_KEYDOWN: + window_imp->mKeyCharCode = 0; // don't know until wm_char comes in next + window_imp->mKeyScanCode = ( l_param >> 16 ) & 0xff; + window_imp->mKeyVirtualKey = w_param; + window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYDOWN"); { if (gDebugWindowProc) @@ -1877,6 +1884,9 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ eat_keystroke = FALSE; case WM_KEYUP: { + window_imp->mKeyScanCode = ( l_param >> 16 ) & 0xff; + window_imp->mKeyVirtualKey = w_param; + window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYUP"); LLFastTimer t2(FTM_KEYHANDLER); @@ -1962,6 +1972,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ break; case WM_CHAR: + window_imp->mKeyCharCode = w_param; + // Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need // to figure out how that works. - Doug // @@ -3033,6 +3045,31 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url ) */ } +/* + Make the raw keyboard data available - used to poke through to LLQtWebKit so + that Qt/Webkit has access to the virtual keycodes etc. that it needs +*/ +LLSD LLWindowWin32::getNativeKeyData() +{ + LLSD result = LLSD::emptyMap(); + + // would like to use LLQtWebKit::KM_MODIFIER_SHIFT but don't want + // make the client depend on llQtWebKit so pass over as an int + // (not bool so we can to modifier list later) + S32 modifiers = 0; + if ( GetKeyState( VK_SHIFT ) ) + { + modifiers = 1; + }; + + // these LLSD names are a little confusing here but they + // make more sense on the Mac specific version and that was done first + result["key_code"] = (S32)mKeyScanCode; + result["char_code"] = (S32)mKeyVirtualKey; + result["modifiers"] = modifiers; + + return result; +} BOOL LLWindowWin32::dialogColorPicker( F32 *r, F32 *g, F32 *b ) { diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index e4e9179db7..d53538cba1 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -128,7 +128,7 @@ protected: HCURSOR loadColorCursor(LPCTSTR name); BOOL isValid(); void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size); - + LLSD getNativeKeyData(); // Changes display resolution. Returns true if successful BOOL setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh); @@ -205,6 +205,10 @@ protected: LLPreeditor *mPreeditor; + U32 mKeyCharCode; + U32 mKeyScanCode; + U32 mKeyVirtualKey; + friend class LLWindowManager; }; diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index e95e9e3b34..89ea1b0537 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -461,6 +461,27 @@ private: return (LLQtWebKit::EKeyboardModifier)result; } + //////////////////////////////////////////////////////////////////////////////// + // + void deserializeKeyboardData( LLSD native_key_data, uint32_t& native_scan_code, uint32_t& native_virtual_key, uint32_t& native_modifiers ) + { + if( native_key_data.isMap() ) + { + // these LLSD names are a little confusing here but they + // make more sense on the Mac specific version and that was done first + native_scan_code = (uint32_t)(native_key_data["key_code"].asInteger()); + native_virtual_key = (uint32_t)(native_key_data["char_code"].asInteger()); + native_modifiers = (uint32_t)(native_key_data["modifiers"].asInteger()); + + // would like to use LLQtWebKit::KM_MODIFIER_SHIFT but don't want + // make the client depend on llQtWebKit so pass over as an int + // (not bool so we can to modifier list later) + if ( native_modifiers == 1 ) + native_modifiers = LLQtWebKit::KM_MODIFIER_SHIFT; + else + native_modifiers = LLQtWebKit::KM_MODIFIER_NONE; + }; + }; //////////////////////////////////////////////////////////////////////////////// // @@ -494,13 +515,7 @@ private: uint32_t native_scan_code = 0; uint32_t native_virtual_key = 0; uint32_t native_modifiers = 0; - - if(native_key_data.isMap()) - { - native_scan_code = (uint32_t)(native_key_data["key_code"].asInteger()); - native_virtual_key = (uint32_t)(native_key_data["char_code"].asInteger()); - native_modifiers = (uint32_t)(native_key_data["modifiers"].asInteger()); - } + deserializeKeyboardData( native_key_data, native_scan_code, native_virtual_key, native_modifiers ); LLQtWebKit::getInstance()->keyboardEvent( mBrowserWindowId, key_event, (uint32_t)key, utf8_text.c_str(), modifiers, native_scan_code, native_virtual_key, native_modifiers); @@ -525,13 +540,7 @@ private: uint32_t native_scan_code = 0; uint32_t native_virtual_key = 0; uint32_t native_modifiers = 0; - - if(native_key_data.isMap()) - { - native_scan_code = (uint32_t)(native_key_data["key_code"].asInteger()); - native_virtual_key = (uint32_t)(native_key_data["char_code"].asInteger()); - native_modifiers = (uint32_t)(native_key_data["modifiers"].asInteger()); - } + deserializeKeyboardData( native_key_data, native_scan_code, native_virtual_key, native_modifiers ); LLQtWebKit::getInstance()->keyboardEvent( mBrowserWindowId, LLQtWebKit::KE_KEY_DOWN, (uint32_t)key, utf8str.c_str(), modifiers, native_scan_code, native_virtual_key, native_modifiers); LLQtWebKit::getInstance()->keyboardEvent( mBrowserWindowId, LLQtWebKit::KE_KEY_UP, (uint32_t)key, utf8str.c_str(), modifiers, native_scan_code, native_virtual_key, native_modifiers); diff --git a/install.xml b/install.xml index 81064c6306..ee8f26378c 100644 --- a/install.xml +++ b/install.xml @@ -962,9 +962,9 @@ anguage Infrstructure (CLI) international standard windows md5sum - c41be1ba9728555ae5a2d2151c96dfe1 + 5c9c02e4f81fc6221225f426653f13b1 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-qt4.6-20100115.tar.bz2 + http://viewer-source-downloads.s3.amazonaws.com/install_pkgs/llqtwebkit-windows-qt4.6-20100204.tar.bz2 -- cgit v1.3 From 38acc15849a0f32ef45a0d668f492b1c6aa65c74 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 5 Feb 2010 18:17:09 -0800 Subject: New mac llqtwebkit library built from: Commit 2d75f75fcbfca93af40415a1499a849b560a65e6 of http://qt.gitorious.org/~girish/qt/girishs-qt/commits/lindenqt Revision b8715abf32cd of https://bitbucket.org/monroe_linden/llqtwebkit-4.6/ --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install.xml') diff --git a/install.xml b/install.xml index fef1ab0ef7..ba955352bf 100644 --- a/install.xml +++ b/install.xml @@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard darwin md5sum - 02d3d8171fff0c673f900f1d1a53046a + 4892774ab65098381b49350b483310b1 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20100119.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20100205.tar.bz2 linux -- cgit v1.3 From cebf73337fca5eaaa9e1055459a7079990d4e664 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 8 Feb 2010 11:30:52 -0800 Subject: Refer to updated LLQtWebKit with fix for potential cookie crash problem. --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install.xml') diff --git a/install.xml b/install.xml index 6a321e758d..5c809ea906 100644 --- a/install.xml +++ b/install.xml @@ -962,9 +962,9 @@ anguage Infrstructure (CLI) international standard windows md5sum - 5c9c02e4f81fc6221225f426653f13b1 + 2477dd86abc9f767526cd81fb0a2c423 url - http://viewer-source-downloads.s3.amazonaws.com/install_pkgs/llqtwebkit-windows-qt4.6-20100204.tar.bz2 + http://viewer-source-downloads.s3.amazonaws.com/install_pkgs/llqtwebkit-windows-qt4.6-20100208.tar.bz2 -- cgit v1.3 From 6cd1b17565e627a7762fd5a7990832ae31494b70 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Mon, 8 Feb 2010 15:33:32 -0800 Subject: Rebuild of mac llqtwebkit library to pick up changeset 4a97db00bfb1 (fix for an accidentally deleted line that prevented cookie file from being read). --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install.xml') diff --git a/install.xml b/install.xml index 5c809ea906..ab1d085736 100644 --- a/install.xml +++ b/install.xml @@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard darwin md5sum - 4892774ab65098381b49350b483310b1 + 95f44f0023dddc80be4398fc4f213861 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20100205.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20100208.tar.bz2 linux -- cgit v1.3 From a01a54bcbc1bab511a460022e21365619662a897 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 8 Feb 2010 15:40:25 -0800 Subject: New version of LLQTwebkit to fix cookie bug introduced by contractor :) --- install.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install.xml') diff --git a/install.xml b/install.xml index 5c809ea906..1315a745fe 100644 --- a/install.xml +++ b/install.xml @@ -962,7 +962,7 @@ anguage Infrstructure (CLI) international standard windows md5sum - 2477dd86abc9f767526cd81fb0a2c423 + df0f751818dddb566d55499286c727a8 url http://viewer-source-downloads.s3.amazonaws.com/install_pkgs/llqtwebkit-windows-qt4.6-20100208.tar.bz2 -- cgit v1.3 From fa8f322ea41edf02d15089b9adebdae31524d893 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 9 Feb 2010 14:51:59 +0000 Subject: upgrade qt+llqtwebkit. not quite as upgraded as it needs to be, but hopefully trunk-breaking. --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install.xml') diff --git a/install.xml b/install.xml index 3214d6c011..27564e12b1 100644 --- a/install.xml +++ b/install.xml @@ -955,9 +955,9 @@ anguage Infrstructure (CLI) international standard linux md5sum - c4c40fca14a8bd32096f8a27c75c526f + 7e4c3c819f27f0f0c19d6f7cd6daf161 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-20100105c.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-20100209.tar.bz2 windows -- cgit v1.3