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

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

Issue 23533030: rAc: Enforce a 3 second grace period for generated card bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 4bf2a850f05b01e105f8afe61e534f34ea5077da..7d07b98020a84519a7bf25f212b2e503c3794094 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -173,6 +173,7 @@ Widget::Widget()
is_mouse_button_pressed_(false),
is_touch_down_(false),
last_mouse_event_was_move_(false),
+ capture_explicitly_set_(false),
root_layers_dirty_(false),
movement_disabled_(false) {
}
@@ -917,11 +918,13 @@ void Widget::SetCapture(View* view) {
root_view_->SetMouseHandler(view);
if (!native_widget_->HasCapture())
native_widget_->SetCapture();
+ capture_explicitly_set_ = true;
sky 2013/09/04 14:10:15 Do you verify all callers of SetCapture are ok wit
Evan Stade 2013/09/04 23:00:38 You are quite right. Do you like this new approach
}
void Widget::ReleaseCapture() {
if (native_widget_->HasCapture())
native_widget_->ReleaseCapture();
+ capture_explicitly_set_ = false;
}
bool Widget::HasCapture() {
@@ -1315,7 +1318,7 @@ void Widget::DestroyRootView() {
// Widget, private:
bool Widget::ShouldReleaseCaptureOnMouseReleased() const {
- return true;
+ return !capture_explicitly_set_;
}
void Widget::SetInactiveRenderingDisabled(bool value) {
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698