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

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

Issue 10383234: views: Do not set capture on a widget if it cannot be activated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit Created 8 years, 7 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 | « ash/system/tray/system_tray_widget_delegate.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | 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 ef990aabdc5b4435456072a093ed0c6d0220ec27..e5f30724ee2144c590d562f78e45a3f4fb91dbd2 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -518,7 +518,7 @@ void Widget::Show() {
native_widget_->Show();
}
- if (close_on_deactivate_) {
+ if (CanActivate() && close_on_deactivate_) {
// Set mouse capture on timeout in case this is called from a
// mouse pressed handler.
MessageLoopForUI::current()->PostTask(FROM_HERE, base::Bind(
« no previous file with comments | « ash/system/tray/system_tray_widget_delegate.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698