Reland "ozone/wayland: Fix drop down menus for touch events."
This is a reland of 7138b785 WaylandPopup didn't allow empty bounds. Fixed by https://crrev.com/c/2397695 Original change's description: > ozone/wayland: Fix drop down menus for touch events. > > In case of touch events, we may not find currently focused windows > as menu windows might be created on touch up events. Thus, > GetCurrentFocusedWindow returns nullptr. > > To fix that, use a concept of a currently active window. That is, > Wayland sets a window to "active" state if it has had a focus. > There can be only one focused window at a time. > > Thus, if there is no a focused window, use currently active window > as a parent. That's the best effort one could make to find a parent > window for a newly created non-toplevel window. At some point, > it might be worth reconsidering the design and make aura always pass > parent widgets for new windows if applicable. > > Bug: 1123521 > Change-Id: Ib9479632e049df082ed17e3089680006a32f19fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2385279 > Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com> > Reviewed-by: Nick Yamane <nickdiego@igalia.com> > Cr-Commit-Position: refs/heads/master@{#804674} Bug: 1123521 Change-Id: I62c6b254bc2e931bc93ac4609290518138aa19b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2397715 Commit-Queue: Antonio Gomes (GMT-4) <tonikitoo@igalia.com> Auto-Submit: Maksim Sisov (GMT+3) <msisov@igalia.com> Reviewed-by:Antonio Gomes (GMT-4) <tonikitoo@igalia.com> Cr-Commit-Position: refs/heads/master@{#804914}
Showing
Please register or sign in to comment