From 5abb6dece78d9c7639511830590e0f447790fa82 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 9 Feb 2010 14:00:33 +0000 Subject: HACK HACK HACK to unbreak linux build while I wait for access to the new llqtwebkit code. only affects linux. may harm webkit functionality temporarily. to be backed-out. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 02dba41f2a..d1f06147d6 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -526,13 +526,14 @@ private: // Any special-case handling we want to do for particular keys... switch((KEY)key) { +#if !LL_LINUX // ASCII codes for some standard keys case LLQtWebKit::KEY_BACKSPACE: utf8_text = (char)8; break; case LLQtWebKit::KEY_TAB: utf8_text = (char)9; break; case LLQtWebKit::KEY_RETURN: utf8_text = (char)13; break; case LLQtWebKit::KEY_PAD_RETURN: utf8_text = (char)13; break; case LLQtWebKit::KEY_ESCAPE: utf8_text = (char)27; break; - +#endif default: break; } @@ -544,7 +545,9 @@ private: uint32_t native_modifiers = 0; deserializeKeyboardData( native_key_data, native_scan_code, native_virtual_key, native_modifiers ); +#if !LL_LINUX LLQtWebKit::getInstance()->keyboardEvent( mBrowserWindowId, key_event, (uint32_t)key, utf8_text.c_str(), modifiers, native_scan_code, native_virtual_key, native_modifiers); +#endif checkEditState(); }; @@ -553,8 +556,12 @@ private: // void unicodeInput( const std::string &utf8str, LLQtWebKit::EKeyboardModifier modifiers, LLSD native_key_data = LLSD::emptyMap()) { +#if !LL_LINUX uint32_t key = LLQtWebKit::KEY_NONE; - +#else + uint32_t key = 0; +#endif + // std::cerr << "unicode input, native_key_data = " << native_key_data << std::endl; if(utf8str.size() == 1) @@ -569,8 +576,10 @@ private: uint32_t native_modifiers = 0; deserializeKeyboardData( native_key_data, native_scan_code, native_virtual_key, native_modifiers ); +#if !LL_LINUX 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); +#endif checkEditState(); }; -- cgit v1.2.3 From c66e9199a56f7fd43ddab423af9d37e71b51f158 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 9 Feb 2010 14:52:13 +0000 Subject: Backed out changeset b1c241040751 --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index d1f06147d6..02dba41f2a 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -526,14 +526,13 @@ private: // Any special-case handling we want to do for particular keys... switch((KEY)key) { -#if !LL_LINUX // ASCII codes for some standard keys case LLQtWebKit::KEY_BACKSPACE: utf8_text = (char)8; break; case LLQtWebKit::KEY_TAB: utf8_text = (char)9; break; case LLQtWebKit::KEY_RETURN: utf8_text = (char)13; break; case LLQtWebKit::KEY_PAD_RETURN: utf8_text = (char)13; break; case LLQtWebKit::KEY_ESCAPE: utf8_text = (char)27; break; -#endif + default: break; } @@ -545,9 +544,7 @@ private: uint32_t native_modifiers = 0; deserializeKeyboardData( native_key_data, native_scan_code, native_virtual_key, native_modifiers ); -#if !LL_LINUX LLQtWebKit::getInstance()->keyboardEvent( mBrowserWindowId, key_event, (uint32_t)key, utf8_text.c_str(), modifiers, native_scan_code, native_virtual_key, native_modifiers); -#endif checkEditState(); }; @@ -556,12 +553,8 @@ private: // void unicodeInput( const std::string &utf8str, LLQtWebKit::EKeyboardModifier modifiers, LLSD native_key_data = LLSD::emptyMap()) { -#if !LL_LINUX uint32_t key = LLQtWebKit::KEY_NONE; -#else - uint32_t key = 0; -#endif - + // std::cerr << "unicode input, native_key_data = " << native_key_data << std::endl; if(utf8str.size() == 1) @@ -576,10 +569,8 @@ private: uint32_t native_modifiers = 0; deserializeKeyboardData( native_key_data, native_scan_code, native_virtual_key, native_modifiers ); -#if !LL_LINUX 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); -#endif checkEditState(); }; -- cgit v1.2.3 From b0791c3001f669a32abc4d4b40f4dc4f6f2bc912 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 9 Feb 2010 15:07:45 +0000 Subject: Backed out changeset 0664cf2c9edf --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index b607d2f66a..3c24b4ed22 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -43,21 +43,15 @@ #include "llpluginmessageclasses.h" #include "media_plugin_base.h" -#if LL_LINUX -extern "C" { -# include -} -#endif // LL_LINUX - #if LL_WINDOWS -# include +#include #else -# include -# include +#include +#include #endif #if LL_WINDOWS - // *NOTE:Mani - This captures the module handle for the dll. This is used below + // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below // to get the path to this dll for webkit initialization. // I don't know how/if this can be done with apr... namespace { HMODULE gModuleHandle;}; @@ -118,16 +112,6 @@ private: // void update(int milliseconds) { -#if LL_LINUX - // pump glib generously, as Linux browser plugins are on the - // glib main loop, even if the browser itself isn't - ugh - //*TODO: shouldn't this be transparent if Qt was compiled with - // glib mainloop integration? investigate. - GMainContext *mainc = g_main_context_default(); - while(g_main_context_iteration(mainc, FALSE)); -#endif // LL_LINUX - - // pump qt LLQtWebKit::getInstance()->pump( milliseconds ); checkEditState(); -- cgit v1.2.3 From 6d08400145c3e3016ab3bccfe24474e52b435c72 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 9 Feb 2010 18:19:35 +0000 Subject: EXT-3651 DEV-44500 Keyboard interaction does not work with Flash media This change lets Linux pass keys through to Flash. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 22e285cdb8..688d3bcd3d 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -488,6 +488,10 @@ private: native_scan_code = (uint32_t)(native_key_data["scan_code"].asInteger()); native_virtual_key = (uint32_t)(native_key_data["virtual_key"].asInteger()); // TODO: I don't think we need to do anything with native modifiers here -- please verify +#elif LL_LINUX + native_scan_code = (uint32_t)(native_key_data["scan_code"].asInteger()); + native_virtual_key = (uint32_t)(native_key_data["virtual_key"].asInteger()); + native_modifiers = (uint32_t)(native_key_data["modifiers"].asInteger()); #else // Add other platforms here as needed #endif -- cgit v1.2.3