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

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

Issue 378333003: Allow menus to stay open during a child view's drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« ui/views/widget/widget.h ('K') | « 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 fdcb32af915e97a73fead05becf0ac0c83dece35..538240f8c6d5c06a6bd41dbccaea4ebfc3d7ed8b 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -158,6 +158,7 @@ Widget::Widget()
widget_delegate_(NULL),
non_client_view_(NULL),
dragged_view_(NULL),
+ child_drag_in_progress_(false),
ownership_(InitParams::NATIVE_WIDGET_OWNS_WIDGET),
is_secondary_widget_(true),
frame_type_(FRAME_TYPE_DEFAULT),
@@ -787,9 +788,11 @@ void Widget::RunShellDrag(View* view,
int operation,
ui::DragDropTypes::DragEventSource source) {
dragged_view_ = view;
+ GetTopLevelWidget()->set_child_drag_in_progress(true);
sky 2014/07/10 15:05:00 You shouldn't need a new field to determine if a d
Devlin 2014/07/10 15:33:00 The issue there is that dragged_view_ is typically
native_widget_->RunShellDrag(view, data, location, operation, source);
// If the view is removed during the drag operation, dragged_view_ is set to
// NULL.
+ GetTopLevelWidget()->set_child_drag_in_progress(false);
Devlin 2014/07/09 18:28:44 This still has the problem that, since capture was
sky 2014/07/10 15:05:00 More specifically the menu is left in a weird stat
Devlin 2014/07/10 15:33:00 Yeah, I would assume that we want to leave the men
if (view && dragged_view_ == view) {
dragged_view_ = NULL;
view->OnDragDone();
« ui/views/widget/widget.h ('K') | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698