| 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 3aa874da6234a674f7da598cd6b0605dea1b0910..9a506a417e6b50469a38eaae6640e32558d4d017 100644
|
| --- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
| +++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
| @@ -138,6 +138,23 @@ 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 use a separate cache to keep track of them.
|
| + // TODO(varkha): Implement caching of all top level X windows and their
|
| + // coordinates and stacking order to eliminate repeated calls to X server
|
| + // during mouse movement, drag and shaping events.
|
| + 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;
|
|
|