diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llwindow/llwindowwin32.cpp | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp index 3729a71..ef3cf68 100644 --- a/linden/indra/llwindow/llwindowwin32.cpp +++ b/linden/indra/llwindow/llwindowwin32.cpp | |||
@@ -1577,8 +1577,11 @@ void LLWindowWin32::gatherInput() | |||
1577 | { | 1577 | { |
1578 | mCallbacks->handlePingWatchdog(this, "Main:TranslateGatherInput"); | 1578 | mCallbacks->handlePingWatchdog(this, "Main:TranslateGatherInput"); |
1579 | TranslateMessage(&msg); | 1579 | TranslateMessage(&msg); |
1580 | mCallbacks->handlePingWatchdog(this, "Main:DispatchGatherInput"); | 1580 | |
1581 | // turn watchdog off in here to not fail if windows is doing something wacky | ||
1582 | mCallbacks->handlePauseWatchdog(this); | ||
1581 | DispatchMessage(&msg); | 1583 | DispatchMessage(&msg); |
1584 | mCallbacks->handleResumeWatchdog(this); | ||
1582 | msg_count++; | 1585 | msg_count++; |
1583 | 1586 | ||
1584 | if ( mInputProcessingPaused ) | 1587 | if ( mInputProcessingPaused ) |
@@ -1623,8 +1626,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1623 | { | 1626 | { |
1624 | LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA); | 1627 | LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA); |
1625 | 1628 | ||
1629 | |||
1626 | if (NULL != window_imp) | 1630 | if (NULL != window_imp) |
1627 | { | 1631 | { |
1632 | window_imp->mCallbacks->handleResumeWatchdog(window_imp); | ||
1633 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:StartWndProc"); | ||
1628 | // Has user provided their own window callback? | 1634 | // Has user provided their own window callback? |
1629 | if (NULL != window_imp->mWndProc) | 1635 | if (NULL != window_imp->mWndProc) |
1630 | { | 1636 | { |
@@ -1635,6 +1641,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1635 | } | 1641 | } |
1636 | } | 1642 | } |
1637 | 1643 | ||
1644 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:PreSwitchWndProc"); | ||
1645 | |||
1638 | // Juggle to make sure we can get negative positions for when | 1646 | // Juggle to make sure we can get negative positions for when |
1639 | // mouse is outside window. | 1647 | // mouse is outside window. |
1640 | LLCoordWindow window_coord((S32)(S16)LOWORD(l_param), (S32)(S16)HIWORD(l_param)); | 1648 | LLCoordWindow window_coord((S32)(S16)LOWORD(l_param), (S32)(S16)HIWORD(l_param)); |
@@ -1654,10 +1662,12 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1654 | S32 update_height; | 1662 | S32 update_height; |
1655 | 1663 | ||
1656 | case WM_TIMER: | 1664 | case WM_TIMER: |
1665 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_TIMER"); | ||
1657 | window_imp->mCallbacks->handleTimerEvent(window_imp); | 1666 | window_imp->mCallbacks->handleTimerEvent(window_imp); |
1658 | break; | 1667 | break; |
1659 | 1668 | ||
1660 | case WM_DEVICECHANGE: | 1669 | case WM_DEVICECHANGE: |
1670 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_DEVICECHANGE"); | ||
1661 | if (gDebugWindowProc) | 1671 | if (gDebugWindowProc) |
1662 | { | 1672 | { |
1663 | llinfos << " WM_DEVICECHANGE: wParam=" << w_param | 1673 | llinfos << " WM_DEVICECHANGE: wParam=" << w_param |
@@ -1673,6 +1683,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1673 | break; | 1683 | break; |
1674 | 1684 | ||
1675 | case WM_PAINT: | 1685 | case WM_PAINT: |
1686 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_PAINT"); | ||
1676 | GetUpdateRect(window_imp->mWindowHandle, &update_rect, FALSE); | 1687 | GetUpdateRect(window_imp->mWindowHandle, &update_rect, FALSE); |
1677 | update_width = update_rect.right - update_rect.left + 1; | 1688 | update_width = update_rect.right - update_rect.left + 1; |
1678 | update_height = update_rect.bottom - update_rect.top + 1; | 1689 | update_height = update_rect.bottom - update_rect.top + 1; |
@@ -1680,6 +1691,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1680 | update_width, update_height); | 1691 | update_width, update_height); |
1681 | break; | 1692 | break; |
1682 | case WM_PARENTNOTIFY: | 1693 | case WM_PARENTNOTIFY: |
1694 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_PARENTNOTIFY"); | ||
1683 | u_msg = u_msg; | 1695 | u_msg = u_msg; |
1684 | break; | 1696 | break; |
1685 | 1697 | ||
@@ -1689,6 +1701,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1689 | 1701 | ||
1690 | // Only take control of cursor over client region of window | 1702 | // Only take control of cursor over client region of window |
1691 | // This allows Windows(tm) to handle resize cursors, etc. | 1703 | // This allows Windows(tm) to handle resize cursors, etc. |
1704 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SETCURSOR"); | ||
1692 | if (LOWORD(l_param) == HTCLIENT) | 1705 | if (LOWORD(l_param) == HTCLIENT) |
1693 | { | 1706 | { |
1694 | SetCursor(window_imp->mCursor[ window_imp->mCurrentCursor] ); | 1707 | SetCursor(window_imp->mCursor[ window_imp->mCurrentCursor] ); |
@@ -1697,14 +1710,17 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1697 | break; | 1710 | break; |
1698 | 1711 | ||
1699 | case WM_ENTERMENULOOP: | 1712 | case WM_ENTERMENULOOP: |
1713 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_ENTERMENULOOP"); | ||
1700 | window_imp->mCallbacks->handleWindowBlock(window_imp); | 1714 | window_imp->mCallbacks->handleWindowBlock(window_imp); |
1701 | break; | 1715 | break; |
1702 | 1716 | ||
1703 | case WM_EXITMENULOOP: | 1717 | case WM_EXITMENULOOP: |
1718 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_EXITMENULOOP"); | ||
1704 | window_imp->mCallbacks->handleWindowUnblock(window_imp); | 1719 | window_imp->mCallbacks->handleWindowUnblock(window_imp); |
1705 | break; | 1720 | break; |
1706 | 1721 | ||
1707 | case WM_ACTIVATEAPP: | 1722 | case WM_ACTIVATEAPP: |
1723 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_ACTIVATEAPP"); | ||
1708 | { | 1724 | { |
1709 | // This message should be sent whenever the app gains or loses focus. | 1725 | // This message should be sent whenever the app gains or loses focus. |
1710 | BOOL activating = (BOOL) w_param; | 1726 | BOOL activating = (BOOL) w_param; |
@@ -1741,6 +1757,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1741 | } | 1757 | } |
1742 | 1758 | ||
1743 | case WM_ACTIVATE: | 1759 | case WM_ACTIVATE: |
1760 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_ACTIVATE"); | ||
1744 | { | 1761 | { |
1745 | // Can be one of WA_ACTIVE, WA_CLICKACTIVE, or WA_INACTIVE | 1762 | // Can be one of WA_ACTIVE, WA_CLICKACTIVE, or WA_INACTIVE |
1746 | BOOL activating = (LOWORD(w_param) != WA_INACTIVE); | 1763 | BOOL activating = (LOWORD(w_param) != WA_INACTIVE); |
@@ -1772,6 +1789,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1772 | break; | 1789 | break; |
1773 | 1790 | ||
1774 | case WM_SYSCOMMAND: | 1791 | case WM_SYSCOMMAND: |
1792 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SYSCOMMAND"); | ||
1775 | switch(w_param) | 1793 | switch(w_param) |
1776 | { | 1794 | { |
1777 | case SC_KEYMENU: | 1795 | case SC_KEYMENU: |
@@ -1786,6 +1804,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1786 | break; | 1804 | break; |
1787 | 1805 | ||
1788 | case WM_CLOSE: | 1806 | case WM_CLOSE: |
1807 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_CLOSE"); | ||
1789 | // Will the app allow the window to close? | 1808 | // Will the app allow the window to close? |
1790 | if (window_imp->mCallbacks->handleCloseRequest(window_imp)) | 1809 | if (window_imp->mCallbacks->handleCloseRequest(window_imp)) |
1791 | { | 1810 | { |
@@ -1796,6 +1815,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1796 | return 0; | 1815 | return 0; |
1797 | 1816 | ||
1798 | case WM_DESTROY: | 1817 | case WM_DESTROY: |
1818 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_DESTROY"); | ||
1799 | if (window_imp->shouldPostQuit()) | 1819 | if (window_imp->shouldPostQuit()) |
1800 | { | 1820 | { |
1801 | PostQuitMessage(0); // Posts WM_QUIT with an exit code of 0 | 1821 | PostQuitMessage(0); // Posts WM_QUIT with an exit code of 0 |
@@ -1803,6 +1823,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1803 | return 0; | 1823 | return 0; |
1804 | 1824 | ||
1805 | case WM_COMMAND: | 1825 | case WM_COMMAND: |
1826 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_COMMAND"); | ||
1806 | if (!HIWORD(w_param)) // this message is from a menu | 1827 | if (!HIWORD(w_param)) // this message is from a menu |
1807 | { | 1828 | { |
1808 | window_imp->mCallbacks->handleMenuSelect(window_imp, LOWORD(w_param)); | 1829 | window_imp->mCallbacks->handleMenuSelect(window_imp, LOWORD(w_param)); |
@@ -1810,9 +1831,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1810 | break; | 1831 | break; |
1811 | 1832 | ||
1812 | case WM_SYSKEYDOWN: | 1833 | case WM_SYSKEYDOWN: |
1834 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SYSKEYDOWN"); | ||
1813 | // allow system keys, such as ALT-F4 to be processed by Windows | 1835 | // allow system keys, such as ALT-F4 to be processed by Windows |
1814 | eat_keystroke = FALSE; | 1836 | eat_keystroke = FALSE; |
1815 | case WM_KEYDOWN: | 1837 | case WM_KEYDOWN: |
1838 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYDOWN"); | ||
1816 | { | 1839 | { |
1817 | if (gDebugWindowProc) | 1840 | if (gDebugWindowProc) |
1818 | { | 1841 | { |
@@ -1831,6 +1854,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1831 | eat_keystroke = FALSE; | 1854 | eat_keystroke = FALSE; |
1832 | case WM_KEYUP: | 1855 | case WM_KEYUP: |
1833 | { | 1856 | { |
1857 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYUP"); | ||
1834 | LLFastTimer t2(LLFastTimer::FTM_KEYHANDLER); | 1858 | LLFastTimer t2(LLFastTimer::FTM_KEYHANDLER); |
1835 | 1859 | ||
1836 | if (gDebugWindowProc) | 1860 | if (gDebugWindowProc) |
@@ -1848,6 +1872,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1848 | break; | 1872 | break; |
1849 | } | 1873 | } |
1850 | case WM_IME_SETCONTEXT: | 1874 | case WM_IME_SETCONTEXT: |
1875 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_SETCONTEXT"); | ||
1851 | if (gDebugWindowProc) | 1876 | if (gDebugWindowProc) |
1852 | { | 1877 | { |
1853 | llinfos << "WM_IME_SETCONTEXT" << llendl; | 1878 | llinfos << "WM_IME_SETCONTEXT" << llendl; |
@@ -1860,6 +1885,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1860 | break; | 1885 | break; |
1861 | 1886 | ||
1862 | case WM_IME_STARTCOMPOSITION: | 1887 | case WM_IME_STARTCOMPOSITION: |
1888 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_STARTCOMPOSITION"); | ||
1863 | if (gDebugWindowProc) | 1889 | if (gDebugWindowProc) |
1864 | { | 1890 | { |
1865 | llinfos << "WM_IME_STARTCOMPOSITION" << llendl; | 1891 | llinfos << "WM_IME_STARTCOMPOSITION" << llendl; |
@@ -1872,6 +1898,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1872 | break; | 1898 | break; |
1873 | 1899 | ||
1874 | case WM_IME_ENDCOMPOSITION: | 1900 | case WM_IME_ENDCOMPOSITION: |
1901 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_ENDCOMPOSITION"); | ||
1875 | if (gDebugWindowProc) | 1902 | if (gDebugWindowProc) |
1876 | { | 1903 | { |
1877 | llinfos << "WM_IME_ENDCOMPOSITION" << llendl; | 1904 | llinfos << "WM_IME_ENDCOMPOSITION" << llendl; |
@@ -1883,6 +1910,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1883 | break; | 1910 | break; |
1884 | 1911 | ||
1885 | case WM_IME_COMPOSITION: | 1912 | case WM_IME_COMPOSITION: |
1913 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_COMPOSITION"); | ||
1886 | if (gDebugWindowProc) | 1914 | if (gDebugWindowProc) |
1887 | { | 1915 | { |
1888 | llinfos << "WM_IME_COMPOSITION" << llendl; | 1916 | llinfos << "WM_IME_COMPOSITION" << llendl; |
@@ -1895,6 +1923,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1895 | break; | 1923 | break; |
1896 | 1924 | ||
1897 | case WM_IME_REQUEST: | 1925 | case WM_IME_REQUEST: |
1926 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_REQUEST"); | ||
1898 | if (gDebugWindowProc) | 1927 | if (gDebugWindowProc) |
1899 | { | 1928 | { |
1900 | llinfos << "WM_IME_REQUEST" << llendl; | 1929 | llinfos << "WM_IME_REQUEST" << llendl; |
@@ -1920,6 +1949,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1920 | // it is worth trying. The good old WM_CHAR works just fine even for supplementary | 1949 | // it is worth trying. The good old WM_CHAR works just fine even for supplementary |
1921 | // characters. We just need to take care of surrogate pairs sent as two WM_CHAR's | 1950 | // characters. We just need to take care of surrogate pairs sent as two WM_CHAR's |
1922 | // by ourselves. It is not that tough. -- Alissa Sabre @ SL | 1951 | // by ourselves. It is not that tough. -- Alissa Sabre @ SL |
1952 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_CHAR"); | ||
1923 | if (gDebugWindowProc) | 1953 | if (gDebugWindowProc) |
1924 | { | 1954 | { |
1925 | LL_INFOS("Window") << "Debug WindowProc WM_CHAR " | 1955 | LL_INFOS("Window") << "Debug WindowProc WM_CHAR " |
@@ -1933,6 +1963,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1933 | 1963 | ||
1934 | case WM_LBUTTONDOWN: | 1964 | case WM_LBUTTONDOWN: |
1935 | { | 1965 | { |
1966 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONDOWN"); | ||
1936 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); | 1967 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); |
1937 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | 1968 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) |
1938 | { | 1969 | { |
@@ -1968,6 +1999,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1968 | //RN: ignore right button double clicks for now | 1999 | //RN: ignore right button double clicks for now |
1969 | //case WM_RBUTTONDBLCLK: | 2000 | //case WM_RBUTTONDBLCLK: |
1970 | { | 2001 | { |
2002 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONDBLCLK"); | ||
1971 | // Because we move the cursor position in the app, we need to query | 2003 | // Because we move the cursor position in the app, we need to query |
1972 | // to find out where the cursor at the time the event is handled. | 2004 | // to find out where the cursor at the time the event is handled. |
1973 | // If we don't do this, many clicks could get buffered up, and if the | 2005 | // If we don't do this, many clicks could get buffered up, and if the |
@@ -1995,6 +2027,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
1995 | 2027 | ||
1996 | case WM_LBUTTONUP: | 2028 | case WM_LBUTTONUP: |
1997 | { | 2029 | { |
2030 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONUP"); | ||
1998 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); | 2031 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); |
1999 | //if (gDebugClicks) | 2032 | //if (gDebugClicks) |
2000 | //{ | 2033 | //{ |
@@ -2028,6 +2061,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2028 | case WM_RBUTTONDBLCLK: | 2061 | case WM_RBUTTONDBLCLK: |
2029 | case WM_RBUTTONDOWN: | 2062 | case WM_RBUTTONDOWN: |
2030 | { | 2063 | { |
2064 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_RBUTTONDOWN"); | ||
2031 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); | 2065 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); |
2032 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | 2066 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) |
2033 | { | 2067 | { |
@@ -2061,6 +2095,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2061 | 2095 | ||
2062 | case WM_RBUTTONUP: | 2096 | case WM_RBUTTONUP: |
2063 | { | 2097 | { |
2098 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_RBUTTONUP"); | ||
2064 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); | 2099 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); |
2065 | // Because we move the cursor position in the app, we need to query | 2100 | // Because we move the cursor position in the app, we need to query |
2066 | // to find out where the cursor at the time the event is handled. | 2101 | // to find out where the cursor at the time the event is handled. |
@@ -2090,6 +2125,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2090 | case WM_MBUTTONDOWN: | 2125 | case WM_MBUTTONDOWN: |
2091 | // case WM_MBUTTONDBLCLK: | 2126 | // case WM_MBUTTONDBLCLK: |
2092 | { | 2127 | { |
2128 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MBUTTONDOWN"); | ||
2093 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); | 2129 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); |
2094 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | 2130 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) |
2095 | { | 2131 | { |
@@ -2123,6 +2159,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2123 | 2159 | ||
2124 | case WM_MBUTTONUP: | 2160 | case WM_MBUTTONUP: |
2125 | { | 2161 | { |
2162 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MBUTTONUP"); | ||
2126 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); | 2163 | LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER); |
2127 | // Because we move the cursor position in tllviewerhe app, we need to query | 2164 | // Because we move the cursor position in tllviewerhe app, we need to query |
2128 | // to find out where the cursor at the time the event is handled. | 2165 | // to find out where the cursor at the time the event is handled. |
@@ -2151,6 +2188,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2151 | 2188 | ||
2152 | case WM_MOUSEWHEEL: | 2189 | case WM_MOUSEWHEEL: |
2153 | { | 2190 | { |
2191 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MOUSEWHEEL"); | ||
2154 | static short z_delta = 0; | 2192 | static short z_delta = 0; |
2155 | 2193 | ||
2156 | z_delta += HIWORD(w_param); | 2194 | z_delta += HIWORD(w_param); |
@@ -2187,6 +2225,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2187 | // Handle mouse movement within the window | 2225 | // Handle mouse movement within the window |
2188 | case WM_MOUSEMOVE: | 2226 | case WM_MOUSEMOVE: |
2189 | { | 2227 | { |
2228 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MOUSEMOVE"); | ||
2190 | window_imp->convertCoords(window_coord, &gl_coord); | 2229 | window_imp->convertCoords(window_coord, &gl_coord); |
2191 | MASK mask = gKeyboard->currentMask(TRUE); | 2230 | MASK mask = gKeyboard->currentMask(TRUE); |
2192 | window_imp->mCallbacks->handleMouseMove(window_imp, gl_coord, mask); | 2231 | window_imp->mCallbacks->handleMouseMove(window_imp, gl_coord, mask); |
@@ -2195,6 +2234,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2195 | 2234 | ||
2196 | case WM_SIZE: | 2235 | case WM_SIZE: |
2197 | { | 2236 | { |
2237 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SIZE"); | ||
2198 | S32 width = S32( LOWORD(l_param) ); | 2238 | S32 width = S32( LOWORD(l_param) ); |
2199 | S32 height = S32( HIWORD(l_param) ); | 2239 | S32 height = S32( HIWORD(l_param) ); |
2200 | 2240 | ||
@@ -2253,6 +2293,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2253 | } | 2293 | } |
2254 | 2294 | ||
2255 | case WM_SETFOCUS: | 2295 | case WM_SETFOCUS: |
2296 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SETFOCUS"); | ||
2256 | if (gDebugWindowProc) | 2297 | if (gDebugWindowProc) |
2257 | { | 2298 | { |
2258 | LL_INFOS("Window") << "WINDOWPROC SetFocus" << LL_ENDL; | 2299 | LL_INFOS("Window") << "WINDOWPROC SetFocus" << LL_ENDL; |
@@ -2261,6 +2302,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2261 | return 0; | 2302 | return 0; |
2262 | 2303 | ||
2263 | case WM_KILLFOCUS: | 2304 | case WM_KILLFOCUS: |
2305 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KILLFOCUS"); | ||
2264 | if (gDebugWindowProc) | 2306 | if (gDebugWindowProc) |
2265 | { | 2307 | { |
2266 | LL_INFOS("Window") << "WINDOWPROC KillFocus" << LL_ENDL; | 2308 | LL_INFOS("Window") << "WINDOWPROC KillFocus" << LL_ENDL; |
@@ -2269,13 +2311,17 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2269 | return 0; | 2311 | return 0; |
2270 | 2312 | ||
2271 | case WM_COPYDATA: | 2313 | case WM_COPYDATA: |
2314 | window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_COPYDATA"); | ||
2272 | // received a URL | 2315 | // received a URL |
2273 | PCOPYDATASTRUCT myCDS = (PCOPYDATASTRUCT) l_param; | 2316 | PCOPYDATASTRUCT myCDS = (PCOPYDATASTRUCT) l_param; |
2274 | window_imp->mCallbacks->handleDataCopy(window_imp, myCDS->dwData, myCDS->lpData); | 2317 | window_imp->mCallbacks->handleDataCopy(window_imp, myCDS->dwData, myCDS->lpData); |
2275 | return 0; | 2318 | return 0; |
2276 | } | 2319 | } |
2320 | |||
2321 | window_imp->mCallbacks->handlePauseWatchdog(window_imp); | ||
2277 | } | 2322 | } |
2278 | 2323 | ||
2324 | |||
2279 | // pass unhandled messages down to Windows | 2325 | // pass unhandled messages down to Windows |
2280 | return DefWindowProc(h_wnd, u_msg, w_param, l_param); | 2326 | return DefWindowProc(h_wnd, u_msg, w_param, l_param); |
2281 | } | 2327 | } |