aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:48 -0500
committerJacek Antonelli2008-08-15 23:44:48 -0500
commit9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 (patch)
tree2f8ae193ab487088962e628f1ee9dee2f5901f01 /linden/indra/llwindow/llwindowwin32.cpp
parentSecond Life viewer sources 1.13.2.12 (diff)
downloadmeta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.zip
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.gz
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.bz2
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.xz
Second Life viewer sources 1.13.2.15
Diffstat (limited to '')
-rw-r--r--linden/indra/llwindow/llwindowwin32.cpp37
1 files changed, 26 insertions, 11 deletions
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp
index b405bdb..5929fb5 100644
--- a/linden/indra/llwindow/llwindowwin32.cpp
+++ b/linden/indra/llwindow/llwindowwin32.cpp
@@ -1969,19 +1969,34 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
1969 // allow system keys, such as ALT-F4 to be processed by Windows 1969 // allow system keys, such as ALT-F4 to be processed by Windows
1970 eat_keystroke = FALSE; 1970 eat_keystroke = FALSE;
1971 case WM_KEYDOWN: 1971 case WM_KEYDOWN:
1972 if (gDebugWindowProc)
1973 {
1974 llinfos << "Debug WindowProc WM_KEYDOWN "
1975 << " key " << S32(w_param)
1976 << llendl;
1977 }
1978 if (gKeyboard->handleKeyDown(w_param, mask) && eat_keystroke)
1979 { 1972 {
1980 return 0; 1973 if (gDebugWindowProc)
1974 {
1975 llinfos << "Debug WindowProc WM_KEYDOWN "
1976 << " key " << S32(w_param)
1977 << llendl;
1978 }
1979 // lower 15 bits hold key repeat count
1980 S32 key_repeat_count = l_param & 0x7fff;
1981 if (key_repeat_count > 1)
1982 {
1983 KEY translated_key;
1984 gKeyboard->translateKey(w_param, &translated_key);
1985 if (!gKeyboard->getKeyDown(translated_key))
1986 {
1987 //RN: hack for handling key repeats when we no longer recognize the key as being down
1988 //This is necessary because we sometimes ignore the message queue and use getAsyncKeyState
1989 // to clear key level flags before we've processed all key repeat messages
1990 return 0;
1991 }
1992 }
1993 if(gKeyboard->handleKeyDown(w_param, mask) && eat_keystroke)
1994 {
1995 return 0;
1996 }
1997 // pass on to windows if we didn't handle it
1998 break;
1981 } 1999 }
1982 // pass on to windows if we didn't handle it
1983 break;
1984
1985 case WM_SYSKEYUP: 2000 case WM_SYSKEYUP:
1986 eat_keystroke = FALSE; 2001 eat_keystroke = FALSE;
1987 case WM_KEYUP: 2002 case WM_KEYUP: