summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp2
-rw-r--r--indra/llwindow/llwindowmacosx.h3
-rw-r--r--indra/llwindow/llwindowsdl.cpp25
-rw-r--r--indra/llwindow/llwindowwin32.cpp26
4 files changed, 40 insertions, 16 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 9daedef1f1..8483e37cf9 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -2880,7 +2880,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
mCurrentCursor = cursor;
}
-ECursorType LLWindowMacOSX::getCursor()
+ECursorType LLWindowMacOSX::getCursor() const
{
return mCurrentCursor;
}
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 58bcd91381..3fb4eff728 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -68,7 +68,7 @@ public:
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
/*virtual*/ void setCursor(ECursorType cursor);
- /*virtual*/ ECursorType getCursor();
+ /*virtual*/ ECursorType getCursor() const;
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
@@ -114,7 +114,6 @@ public:
/*virtual*/ void bringToFront() {};
/*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b);
- /*virtual*/ void updateLanguageTextInputArea(const LLCoordGL& caret, const LLRect& bounds);
/*virtual*/ void interruptLanguageTextInput();
protected:
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 5597ff4334..519e0e8ec8 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -48,6 +48,7 @@
extern "C" {
# include "gtk/gtk.h"
}
+#include <locale.h>
#endif // LL_GTK
#if LL_LINUX || LL_SOLARIS
@@ -137,11 +138,11 @@ BOOL ll_try_gtk_init(void)
<< gtk_major_version << "."
<< gtk_minor_version << "."
<< gtk_micro_version << llendl;
- gchar *gtk_warning;
maybe_lock_display();
- gtk_warning = gtk_check_version(GTK_MAJOR_VERSION,
- GTK_MINOR_VERSION,
- GTK_MICRO_VERSION);
+ const gchar* gtk_warning = gtk_check_version(
+ GTK_MAJOR_VERSION,
+ GTK_MINOR_VERSION,
+ GTK_MICRO_VERSION);
maybe_unlock_display();
if (gtk_warning)
{
@@ -2028,12 +2029,16 @@ void LLWindowSDL::gatherInput()
// and crashness. (SL-35450)
std::string saved_locale = setlocale(LC_ALL, NULL);
- // Do a limited number of pumps so SL doesn't starve!
- // *TODO: this should ideally be time-limited, not count-limited.
- gtk_main_iteration_do(0); // Always do one non-blocking pump
- for (int iter=0; iter<10; ++iter)
- if (gtk_events_pending())
- gtk_main_iteration();
+ // Pump until we've nothing left to do or passed 1/15th of a
+ // second pumping for this frame.
+ static LLTimer pump_timer;
+ pump_timer.reset();
+ pump_timer.setTimerExpirySec(1.0f / 15.0f);
+ do {
+ // Always do at least one non-blocking pump
+ gtk_main_iteration_do(0);
+ } while (gtk_events_pending() &&
+ !pump_timer.hasExpired());
setlocale(LC_ALL, saved_locale.c_str() );
}
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index c9554ce7fe..f05397b058 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3038,10 +3038,29 @@ void spawn_web_browser(const char* escaped_url )
llinfos << "Opening URL " << escaped_url << llendl;
+ // replaced ShellExecute code with ShellExecuteEx since ShellExecute doesn't work
+ // reliablly on Vista.
+
+ // this is madness.. no, this is..
+ LLWString url_wstring = utf8str_to_wstring( escaped_url );
+ llutf16string url_utf16 = wstring_to_utf16str( url_wstring );
+
+ // let the OS decide what to use to open the URL
+ SHELLEXECUTEINFO sei = { sizeof( sei ) };
+ sei.fMask = SEE_MASK_FLAG_DDEWAIT;
+ sei.nShow = SW_SHOWNORMAL;
+ sei.lpVerb = L"open";
+ sei.lpFile = url_utf16.c_str();
+ ShellExecuteEx( &sei );
+
+ //// TODO: LEAVING OLD CODE HERE SO I DON'T BONE OTHER MERGES
+ //// DELETE THIS ONCE THE MERGES ARE DONE
+
// Figure out the user's default web browser
// HKEY_CLASSES_ROOT\http\shell\open\command
- char reg_path_str[256]; /* Flawfinder: ignore */
- snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); /* Flawfinder: ignore */
+ /*
+ char reg_path_str[256]; // Flawfinder: ignore
+ snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); // Flawfinder: ignore
WCHAR reg_path_wstr[256];
mbstowcs(reg_path_wstr, reg_path_str, sizeof(reg_path_wstr)/sizeof(reg_path_wstr[0]));
@@ -3092,7 +3111,7 @@ void spawn_web_browser(const char* escaped_url )
// MS docs say to cast to int and compare to 32.
HWND our_window = NULL;
LPCWSTR directory_wstr = NULL;
- int retval = (int) ShellExecute(our_window, /* Flawfinder: ignore */
+ int retval = (int) ShellExecute(our_window, // Flawfinder: ignore
L"open",
browser_exec_utf16.c_str(),
url_utf16.c_str(),
@@ -3106,6 +3125,7 @@ void spawn_web_browser(const char* escaped_url )
{
llinfos << "load_url failure with " << retval << llendl;
}
+ */
}