diff options
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 73 | ||||
-rw-r--r-- | indra/llwindow/llwindowsdl.h | 13 | ||||
-rw-r--r-- | indra/media_plugins/webkit/media_plugin_webkit.cpp | 28 | ||||
-rw-r--r-- | indra/newview/skins/default/colors.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/world/BeaconArrow.png | bin | 1965 -> 994 bytes | |||
-rw-r--r-- | install.xml | 4 |
6 files changed, 79 insertions, 41 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index f9c3694459..7cd06c9c37 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -251,6 +251,10 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, #if LL_X11 mFlashing = FALSE; #endif // LL_X11 + + mKeyScanCode = 0; + mKeyVirtualKey = 0; + mKeyModifiers = KMOD_NONE; } static SDL_Surface *Load_BMP_Resource(const char *basename) @@ -1651,24 +1655,32 @@ void LLWindowSDL::gatherInput() } case SDL_KEYDOWN: - gKeyboard->handleKeyDown(event.key.keysym.sym, event.key.keysym.mod); - // part of the fix for SL-13243 - if (SDLCheckGrabbyKeys(event.key.keysym.sym, TRUE) != 0) - SDLReallyCaptureInput(TRUE); - - if (event.key.keysym.unicode) - { - handleUnicodeUTF16(event.key.keysym.unicode, - gKeyboard->currentMask(FALSE)); - } + mKeyScanCode = event.key.keysym.scancode; + mKeyVirtualKey = event.key.keysym.unicode; + mKeyModifiers = event.key.keysym.mod; + + gKeyboard->handleKeyDown(event.key.keysym.sym, event.key.keysym.mod); + // part of the fix for SL-13243 + if (SDLCheckGrabbyKeys(event.key.keysym.sym, TRUE) != 0) + SDLReallyCaptureInput(TRUE); + + if (event.key.keysym.unicode) + { + handleUnicodeUTF16(event.key.keysym.unicode, + gKeyboard->currentMask(FALSE)); + } break; case SDL_KEYUP: - if (SDLCheckGrabbyKeys(event.key.keysym.sym, FALSE) == 0) - SDLReallyCaptureInput(FALSE); // part of the fix for SL-13243 + mKeyScanCode = event.key.keysym.scancode; + mKeyVirtualKey = event.key.keysym.unicode; + mKeyModifiers = event.key.keysym.mod; - gKeyboard->handleKeyUp(event.key.keysym.sym, event.key.keysym.mod); - break; + if (SDLCheckGrabbyKeys(event.key.keysym.sym, FALSE) == 0) + SDLReallyCaptureInput(FALSE); // part of the fix for SL-13243 + + gKeyboard->handleKeyUp(event.key.keysym.sym, event.key.keysym.mod); + break; case SDL_MOUSEBUTTONDOWN: { @@ -2224,6 +2236,39 @@ static void color_changed_callback(GtkWidget *widget, gtk_color_selection_get_current_color(colorsel, colorp); } + +/* + 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 LLWindowSDL::getNativeKeyData() +{ + LLSD result = LLSD::emptyMap(); + + U32 modifiers = 0; // pretend-native modifiers... oh what a tangled web we weave! + + // we go through so many levels of device abstraction that I can't really guess + // what a plugin under GDK under Qt under SL under SDL under X11 considers + // a 'native' modifier mask. this has been sort of reverse-engineered... they *appear* + // to match GDK consts, but that may be co-incidence. + modifiers |= (mKeyModifiers & KMOD_LSHIFT) ? 0x0001 : 0; + modifiers |= (mKeyModifiers & KMOD_RSHIFT) ? 0x0001 : 0;// munge these into the same shift + modifiers |= (mKeyModifiers & KMOD_CAPS) ? 0x0002 : 0; + modifiers |= (mKeyModifiers & KMOD_LCTRL) ? 0x0004 : 0; + modifiers |= (mKeyModifiers & KMOD_RCTRL) ? 0x0004 : 0;// munge these into the same ctrl + modifiers |= (mKeyModifiers & KMOD_LALT) ? 0x0008 : 0;// untested + modifiers |= (mKeyModifiers & KMOD_RALT) ? 0x0008 : 0;// untested + // *todo: test ALTs - I don't have a case for testing these. Do you? + // *todo: NUM? - I don't care enough right now (and it's not a GDK modifier). + + result["scan_code"] = (S32)mKeyScanCode; + result["virtual_key"] = (S32)mKeyVirtualKey; + result["modifiers"] = (S32)modifiers; + + return result; +} + + BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b) { BOOL rtn = FALSE; diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index 0ba1c861da..e6bdd46a77 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -102,7 +102,7 @@ public: /*virtual*/ void gatherInput(); /*virtual*/ void swapBuffers(); - /*virtual*/ void delayInputProcessing() { }; + /*virtual*/ void delayInputProcessing() { }; // handy coordinate space conversion routines /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to); @@ -155,12 +155,13 @@ protected: BOOL ignore_pixel_depth, U32 fsaa_samples); ~LLWindowSDL(); + /*virtual*/ BOOL isValid(); + /*virtual*/ LLSD getNativeKeyData(); + void initCursors(); void quitCursors(); - BOOL isValid(); void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size); - // Changes display resolution. Returns true if successful BOOL setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh); @@ -204,12 +205,16 @@ protected: friend class LLWindowManager; -#if LL_X11 private: +#if LL_X11 void x11_set_urgent(BOOL urgent); BOOL mFlashing; LLTimer mFlashTimer; #endif //LL_X11 + + U32 mKeyScanCode; + U32 mKeyVirtualKey; + SDLMod mKeyModifiers; }; diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 02dba41f2a..688d3bcd3d 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 <glib.h> -} -#endif // LL_LINUX - #if LL_WINDOWS -# include <direct.h> +#include <direct.h> #else -# include <unistd.h> -# include <stdlib.h> +#include <unistd.h> +#include <stdlib.h> #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(); @@ -504,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 diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index ca579616d8..b33d4f73a4 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -554,7 +554,7 @@ reference="White" /> <color name="ObjectChatColor" - reference="EmphasisColor_35" /> + reference="EmphasisColor" /> <color name="OverdrivenColor" reference="Red" /> diff --git a/indra/newview/skins/default/textures/world/BeaconArrow.png b/indra/newview/skins/default/textures/world/BeaconArrow.png Binary files differindex 12dc246d51..54934f738a 100644 --- a/indra/newview/skins/default/textures/world/BeaconArrow.png +++ b/indra/newview/skins/default/textures/world/BeaconArrow.png diff --git a/install.xml b/install.xml index 3214d6c011..1e8fa70d46 100644 --- a/install.xml +++ b/install.xml @@ -955,9 +955,9 @@ anguage Infrstructure (CLI) international standard</string> <key>linux</key> <map> <key>md5sum</key> - <string>c4c40fca14a8bd32096f8a27c75c526f</string> + <string>4c75b2f1e8524c7844ee3ea1cd59a3db</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-20100105c.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-20100209b.tar.bz2</uri> </map> <key>windows</key> <map> |