| Index: ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
| diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.cc b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
| index d98dfa644354d2590d7e42c20e4eb52eaa68fdd2..de968b2a6378250190dcd06f543ce23cc11b9845 100644
|
| --- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
| +++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
| @@ -165,6 +165,20 @@ uint32_t X11DesktopHandler::Dispatch(const base::NativeEvent& event) {
|
| }
|
| break;
|
| }
|
| + // Menus created by Chrome can be Drag and Drop targets. Since they are
|
| + // direct children of the screen root window and have override_redirect
|
| + // we cannot use regular _NET_CLIENT_LIST_STACKING property to find them
|
| + // and therefore use a separate cache to keep track of them.
|
| + case CreateNotify: {
|
| + XCreateWindowEvent *xcwe = &event->xcreatewindow;
|
| + ui::XMenuList::GetInstance()->MaybeRegisterMenu(xcwe->window);
|
| + break;
|
| + }
|
| + case DestroyNotify: {
|
| + XDestroyWindowEvent *xdwe = &event->xdestroywindow;
|
| + ui::XMenuList::GetInstance()->MaybeUnregisterMenu(xdwe->window);
|
| + break;
|
| + }
|
| }
|
|
|
| return POST_DISPATCH_NONE;
|
|
|