Chromium Code Reviews
Descriptionmash: Close system tray bubble on click outside its bounds, part 1
Mus does not support global event handlers, so the existing TrayEventFilter
cannot be used to close the bubble. Instead we use mouse capture.
* Capture the mouse explicitly when the bubble is spawned and release it on
clicks outside its bounds.
* Always close the bubble on capture loss, in case some other part of the
window system breaks capture.
Also fix an issue with auto-release-capture at the widget level. If a view
explicitly requested capture via Widget::SetCapture(my_view) and explicitly
did not request auto-release-capture, then any mouse release event would
cause the view to lose capture (that is, being an explicit mouse handler
target at the RootView level). Fix this so that these sorts of views will
continue to receive events until they explicit release capture.
Note that this code still eats the mousedown event that causes the bubble to
close. Fixing that is part 2.
BUG=599142
Committed: https://crrev.com/5eb778dc5a2a4762fe95d67f2adc151f928d7939
Cr-Commit-Position: refs/heads/master@{#386402}
Patch Set 1 #Patch Set 2 : rebase and add test #Patch Set 3 : tweak comments #
Total comments: 1
Patch Set 4 : review comments #
Total comments: 3
Messages
Total messages: 23 (10 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||