[ozone/x11] Resolve event clicking locations in X11
This patch concerns so called external window mode, which is being developed downstream now [1]. The problem this CL fixes is the following: Even though events are passed to the right X11WindowOzone based on an XID target now, there can be cases when the events must be rerouted to another X11WindowOzone, for example, a context menu or a nested 3-dot menu. In case of a nested 3-dot menu, events must always be passed to the parent menu, so that the menu controller would handle events properly. Another case is handling events when a user clicks outside the menu's area: even though the events can be targeted for another window, there can be an explicit grab that must reroute them to the menu window, which will be closed as soon as a user clicks outside the menu's area. The patch fixes the above mentioned problem the following way: 1) Once an explicit grab is set, the events are passed to an X11WindowOzone have their locations converted and are rerouted to a grabbed window. 2) Whenever a grabbed window looses an explicit capture, X11WindowManager tells X11WindowOzone the capture is lost and the |delegate_| is notified about that. [1] https://github.com/Igalia/chromium Bug: 707406 Change-Id: I1b00e79c8ddc17b000c2f55b7f39c9ea16c0c71a Reviewed-on: https://chromium-review.googlesource.com/790773 Commit-Queue: Maksim Sisov <msisov@igalia.com> Reviewed-by:Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by:
Robert Kroeger <rjkroege@chromium.org> Reviewed-by:
kylechar <kylechar@chromium.org> Reviewed-by:
Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#542927}
Showing
Please register or sign in to comment