From 69e7afee268d1cb62607eca68212207a6ac8f38a Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 7 Mar 2018 13:44:55 +0100 Subject: [PATCH] fix dev tools window interfering with mouse forward (#12132) --- atom/browser/native_window_views_win.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/atom/browser/native_window_views_win.cc b/atom/browser/native_window_views_win.cc index 83e7dfaa79a..746a9978b8f 100644 --- a/atom/browser/native_window_views_win.cc +++ b/atom/browser/native_window_views_win.cc @@ -160,8 +160,12 @@ bool NativeWindowViews::PreHandleMSG( if (LOWORD(w_param) == WM_CREATE) { // Because of reasons regarding legacy drivers and stuff, a window that // matches the client area is created and used internally by Chromium. - // This is used when forwarding mouse messages. - legacy_window_ = reinterpret_cast(l_param); + // This is used when forwarding mouse messages. We only cache the first + // occurrence (the webview window) because dev tools also cause this + // message to be sent. + if (!legacy_window_) { + legacy_window_ = reinterpret_cast(l_param); + } } return false; }