Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Issue 25445002: Ensure that in Desktop AURA the WindowModalityController class is at the head of the event pre targ… (Closed)

Created:
7 years, 2 months ago by ananta
Modified:
7 years, 2 months ago
CC:
chromium-reviews, tfarina, ben+watch_chromium.org
Visibility:
Public.

Description

Ensure that in Desktop AURA the WindowModalityController class is at the head of the event pre target handlers list. This ensures that it handles input events first when modal windows are at the top of the Zorder. This logic has been added to the DesktopNativeWidgetAura::InstallWindowModalityController function which is called by the DesktopRootWindowHost implementations on windows and linux when the root window is created. The logic in ash shell.cc has also been changed to instantiate the WindowModalityController object at the beginning. The class WindowModalityController now takes the EventTarget as an argument in its ctor and adds itself to the pre target list. Added a DCHECK here to check if the pre target list in the EventTarget is empty. The WindowModalityController removes itself from the pre target list in its dtor. BUG=299662 R=sky@chromium.org, sky TEST=Covered by Desktop AURA widget test WindowMouseModalityTest Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226609

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -18 lines) Patch
M ash/shell.cc View 1 2 4 chunks +8 lines, -5 lines 0 comments Download
M ui/events/event_target.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/events/event_target.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/corewm/window_modality_controller.h View 1 3 chunks +4 lines, -1 line 0 comments Download
M ui/views/corewm/window_modality_controller.cc View 1 2 chunks +7 lines, -1 line 0 comments Download
M ui/views/widget/desktop_aura/desktop_native_widget_aura.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_native_widget_aura.cc View 1 2 5 chunks +18 lines, -11 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_win.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 1 2 chunks +89 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
ananta
7 years, 2 months ago (2013-10-01 04:09:52 UTC) #1
sky
Also, is it possible to write a test for this? Not one that verifies order ...
7 years, 2 months ago (2013-10-01 17:32:12 UTC) #2
Ben Goodger (Google)
The order here was inspired by the ordering in src/ash/shell.cc. Is there a bug in ...
7 years, 2 months ago (2013-10-01 17:42:54 UTC) #3
ananta
Added a Desktop AURA based widget unittest WindowMouseModalityTest which verifies the modality behavior with mouse ...
7 years, 2 months ago (2013-10-01 22:37:32 UTC) #4
sky
LGTM https://codereview.chromium.org/25445002/diff/29001/ash/shell.cc File ash/shell.cc (right): https://codereview.chromium.org/25445002/diff/29001/ash/shell.cc#newcode430 ash/shell.cc:430: window_modality_controller_.reset( Add comment that order is important here. ...
7 years, 2 months ago (2013-10-02 15:54:12 UTC) #5
ananta
https://codereview.chromium.org/25445002/diff/29001/ash/shell.cc File ash/shell.cc (right): https://codereview.chromium.org/25445002/diff/29001/ash/shell.cc#newcode430 ash/shell.cc:430: window_modality_controller_.reset( On 2013/10/02 15:54:12, sky wrote: > Add comment ...
7 years, 2 months ago (2013-10-02 17:46:55 UTC) #6
ananta
7 years, 2 months ago (2013-10-02 23:17:11 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 manually as r226609 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698