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

Unified Diff: ui/views/widget/root_view.cc

Issue 1887263002: Revert of mash: Close system tray bubble on click outside its bounds, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/widget/root_view.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view.cc
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index 7f72a26bbcc0ccb1a6f471d340bdfa4a5b72c5b9..ff1294ae9f776ca0cd17acde66aea875292c6265 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -157,7 +157,6 @@
mouse_move_handler_(NULL),
last_click_handler_(NULL),
explicit_mouse_handler_(false),
- clear_mouse_handler_on_release_(true),
last_mouse_event_flags_(0),
last_mouse_event_x_(-1),
last_mouse_event_y_(-1),
@@ -442,8 +441,7 @@
// We allow the view to delete us from the event dispatch callback. As such,
// configure state such that we're done first, then call View.
View* mouse_pressed_handler = mouse_pressed_handler_;
- if (clear_mouse_handler_on_release_)
- SetMouseHandler(nullptr);
+ SetMouseHandler(NULL);
ui::EventDispatchDetails dispatch_details =
DispatchEvent(mouse_pressed_handler, &mouse_released);
if (dispatch_details.dispatcher_destroyed)
@@ -594,7 +592,11 @@
}
void RootView::SetMouseHandler(View* new_mh) {
- SetMouseHandler(new_mh, true /* clear_on_release */);
+ // If we're clearing the mouse handler, clear explicit_mouse_handler_ as well.
+ explicit_mouse_handler_ = (new_mh != NULL);
+ mouse_pressed_handler_ = new_mh;
+ gesture_handler_ = new_mh;
+ drag_info_.Reset();
}
void RootView::GetAccessibleState(ui::AXViewState* state) {
@@ -634,7 +636,6 @@
// handlers are reset, so that after it is reshown, events are not captured
// by old handlers.
explicit_mouse_handler_ = false;
- clear_mouse_handler_on_release_ = true;
mouse_pressed_handler_ = NULL;
mouse_move_handler_ = NULL;
gesture_handler_ = NULL;
@@ -704,15 +705,6 @@
return ui::EventDispatchDetails();
}
-void RootView::SetMouseHandler(View* new_mh, bool clear_on_release) {
- // If we're clearing the mouse handler, clear explicit_mouse_handler_ as well.
- explicit_mouse_handler_ = (new_mh != nullptr);
- clear_mouse_handler_on_release_ = clear_on_release;
- mouse_pressed_handler_ = new_mh;
- gesture_handler_ = new_mh;
- drag_info_.Reset();
-}
-
bool RootView::CanDispatchToTarget(ui::EventTarget* target) {
return event_dispatch_target_ == target;
}
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698