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

Unified Diff: ui/views/corewm/tooltip_controller.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/win/hwnd_message_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/tooltip_controller.cc
diff --git a/ui/views/corewm/tooltip_controller.cc b/ui/views/corewm/tooltip_controller.cc
index 02cd71ac0ad1de86d15d5c94e8f65f839a3e7024..a33d8e08ed7f1205a37102a1a60d571ec1cef913 100644
--- a/ui/views/corewm/tooltip_controller.cc
+++ b/ui/views/corewm/tooltip_controller.cc
@@ -189,6 +189,15 @@ void TooltipController::OnMouseEvent(ui::MouseEvent* event) {
UpdateIfRequired();
return;
}
+ // TODO: Wrap this up in the previous test.
+ if ((event->flags() & ui::EF_FROM_TOUCH) ||
+ (event->flags() & ui::EF_IS_SYNTHESIZED) ||
+ (event->flags() & ui::EF_CURSOR_HIDDEN)) {
+ SetTooltipWindow(nullptr);
+ if (tooltip_->IsVisible())
+ UpdateIfRequired();
+ return;
+ }
switch (event->type()) {
case ui::ET_MOUSE_CAPTURE_CHANGED:
case ui::ET_MOUSE_EXITED:
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/win/hwnd_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698