Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(909)

Side by Side Diff: ui/platform_window/win/win_window.cc

Issue 2925853002: Flag mouse messages received when cursor is hidden.
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/views/animation/ink_drop_host_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/platform_window/win/win_window.h" 5 #include "ui/platform_window/win/win_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return nullptr; 129 return nullptr;
130 } 130 }
131 131
132 LRESULT WinWindow::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { 132 LRESULT WinWindow::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) {
133 MSG msg = { hwnd(), message, w_param, l_param, 133 MSG msg = { hwnd(), message, w_param, l_param,
134 static_cast<DWORD>(GetMessageTime()), 134 static_cast<DWORD>(GetMessageTime()),
135 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } }; 135 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } };
136 std::unique_ptr<Event> event = EventFromNative(msg); 136 std::unique_ptr<Event> event = EventFromNative(msg);
137 if (IsMouseEventFromTouch(message)) 137 if (IsMouseEventFromTouch(message))
138 event->set_flags(event->flags() | EF_FROM_TOUCH); 138 event->set_flags(event->flags() | EF_FROM_TOUCH);
139 if (IsWindowsCursorHidden())
140 event->set_flags(event->flags() | EF_CURSOR_HIDDEN);
139 if (!(event->flags() & ui::EF_IS_NON_CLIENT)) 141 if (!(event->flags() & ui::EF_IS_NON_CLIENT))
140 delegate_->DispatchEvent(event.get()); 142 delegate_->DispatchEvent(event.get());
141 SetMsgHandled(event->handled()); 143 SetMsgHandled(event->handled());
142 return 0; 144 return 0;
143 } 145 }
144 146
145 LRESULT WinWindow::OnCaptureChanged(UINT message, 147 LRESULT WinWindow::OnCaptureChanged(UINT message,
146 WPARAM w_param, 148 WPARAM w_param,
147 LPARAM l_param) { 149 LPARAM l_param) {
148 delegate_->OnLostCapture(); 150 delegate_->OnLostCapture();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 200
199 namespace test { 201 namespace test {
200 202
201 // static 203 // static
202 void SetUsePopupAsRootWindowForTest(bool use) { 204 void SetUsePopupAsRootWindowForTest(bool use) {
203 use_popup_as_root_window_for_test = use; 205 use_popup_as_root_window_for_test = use;
204 } 206 }
205 207
206 } // namespace test 208 } // namespace test
207 } // namespace ui 209 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/views/animation/ink_drop_host_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698