From 4d840e00a2a5fffef2b4b428c3f71e70c9d01aa5 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 17 Apr 2015 00:57:24 +0200 Subject: [PATCH] Backup f9628f6e4492 (temporary fix for FIRE-15529) - LL fix is coming next --- indra/llwindow/llwindowwin32.cpp | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index bda7b79380..daffb60f45 100755 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1868,8 +1868,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ // Ignore the double click received right after activating app. // This is to avoid triggering double click teleport after returning focus (see MAINT-3786). - // FIRE-15529: Double clicks not working after giving focus back to the viewer - //static bool sHandleDoubleClick = true; + static bool sHandleDoubleClick = true; // LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA); LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr(h_wnd, GWLP_USERDATA); @@ -1998,12 +1997,10 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ } } - // FIRE-15529: Double clicks not working after giving focus back to the viewer - //if (!activating) - //{ - // sHandleDoubleClick = false; - //} - // + if (!activating) + { + sHandleDoubleClick = false; + } window_imp->mCallbacks->handleActivateApp(window_imp, activating); @@ -2229,8 +2226,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_NCLBUTTONDOWN"); // A click in a non-client area, e.g. title bar or window border. sHandleLeftMouseUp = false; - // FIRE-15529: Double clicks not working after giving focus back to the viewer - //sHandleDoubleClick = true; + sHandleDoubleClick = true; } break; @@ -2276,13 +2272,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONDBLCLK"); - // FIRE-15529: Double clicks not working after giving focus back to the viewer - //if (!sHandleDoubleClick) - //{ - // sHandleDoubleClick = true; - // break; - //} - // + if (!sHandleDoubleClick) + { + sHandleDoubleClick = true; + break; + } // Because we move the cursor position in the app, we need to query // to find out where the cursor at the time the event is handled.