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

Issue 111043002: Cursor state should be global for desktop Aura (Closed)

Created:
7 years ago by tdanderson
Modified:
7 years ago
CC:
chromium-reviews, tfarina, ben+views_chromium.org, ben+corewm_chromium.org
Visibility:
Public.

Description

DesktopNativeCursorManager currently only has knowledge of a single RootWindow, which means that it is possible for a change in cursor state within one RootWindow to cause another RootWindow to have a stale cursor state. This CL makes changes in cursor state global among all root windows by doing the following: - Make CursorManager and DesktopNativeCursorManager static members of DesktopNativeWidgetAura. - Maintain a set of root windows in DesktopNativeCursorManager. - When a native widget is initialized, add its owned root window to this set. When a native widget is destroyed, remove its owned root window from this set. - Whenever a call to the public CursorClient API causes a change in cursor state, inform all root windows in this set. This change makes cursor management for desktop Aura behave similar to cursor management in Ash, where all root windows are already notified of cursor state changes. BUG=324006 TEST=DesktopNativeWidgetAuraTest.GlobalCursorState Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240827

Patch Set 1 #

Patch Set 2 : updated WIP #

Patch Set 3 : Test added #

Total comments: 3

Patch Set 4 : Updated patch #

Patch Set 5 : Updated patch #

Patch Set 6 : Updated patch #

Total comments: 3

Patch Set 7 : Don't copy set of root windows before iterating #

Messages

Total messages: 22 (0 generated)
Elliot Glaysher
Taking a step back, is it conceptually the correct thing to make a change to ...
7 years ago (2013-12-10 19:12:56 UTC) #1
tdanderson
On 2013/12/10 19:12:56, Elliot Glaysher wrote: > Taking a step back, is it conceptually the ...
7 years ago (2013-12-10 20:13:58 UTC) #2
oshima
On 2013/12/10 20:13:58, tdanderson wrote: > On 2013/12/10 19:12:56, Elliot Glaysher wrote: > > Taking ...
7 years ago (2013-12-10 22:05:44 UTC) #3
tdanderson
sky@, oshima@, and erg@, can you please take a look? If this looks good, I ...
7 years ago (2013-12-11 21:57:54 UTC) #4
Elliot Glaysher
On 2013/12/10 22:05:44, oshima wrote: > Aura actively updates the cursor (which is different from ...
7 years ago (2013-12-11 23:47:42 UTC) #5
oshima
I discussed this with erg@ offline and agreed that we can proceed with global state ...
7 years ago (2013-12-13 00:13:32 UTC) #6
sky
https://codereview.chromium.org/111043002/diff/100001/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc File ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc (right): https://codereview.chromium.org/111043002/diff/100001/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc#newcode78 ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc:78: RootWindows root_windows(root_windows_); Do you really need to copy here ...
7 years ago (2013-12-13 16:56:43 UTC) #7
tdanderson
https://codereview.chromium.org/111043002/diff/100001/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc File ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc (right): https://codereview.chromium.org/111043002/diff/100001/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc#newcode78 ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc:78: RootWindows root_windows(root_windows_); On 2013/12/13 16:56:44, sky wrote: > Do ...
7 years ago (2013-12-13 17:05:14 UTC) #8
tdanderson
https://codereview.chromium.org/111043002/diff/100001/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc File ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc (right): https://codereview.chromium.org/111043002/diff/100001/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc#newcode78 ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc:78: RootWindows root_windows(root_windows_); On 2013/12/13 16:56:44, sky wrote: > Do ...
7 years ago (2013-12-13 17:05:15 UTC) #9
sky
No copy at all. I understand there are places where you want to copy, such ...
7 years ago (2013-12-13 17:52:37 UTC) #10
oshima
https://codereview.chromium.org/111043002/diff/100001/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc File ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc (right): https://codereview.chromium.org/111043002/diff/100001/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc#newcode78 ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc:78: RootWindows root_windows(root_windows_); On 2013/12/13 17:05:15, tdanderson wrote: > On ...
7 years ago (2013-12-13 18:08:28 UTC) #11
tdanderson
OK, I removed the copying in PS7. I had seen this done in CaptureController and ...
7 years ago (2013-12-13 18:34:17 UTC) #12
tdanderson
@sky, can you let me know what you think about my question in DNWA (in ...
7 years ago (2013-12-13 18:52:24 UTC) #13
sky
https://codereview.chromium.org/111043002/diff/40001/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (right): https://codereview.chromium.org/111043002/diff/40001/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#newcode218 ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:218: cursor_(gfx::kNullCursor), On 2013/12/11 21:57:54, tdanderson wrote: > Is there ...
7 years ago (2013-12-13 20:30:59 UTC) #14
sky
+ananta (see comment here: https://codereview.chromium.org/111043002/diff/40001/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#newcode218 )
7 years ago (2013-12-13 20:31:23 UTC) #15
oshima
https://codereview.chromium.org/111043002/diff/40001/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (right): https://codereview.chromium.org/111043002/diff/40001/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#newcode218 ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:218: cursor_(gfx::kNullCursor), On 2013/12/13 20:31:00, sky wrote: > On 2013/12/11 ...
7 years ago (2013-12-13 20:36:31 UTC) #16
sky
On 2013/12/13 20:36:31, oshima wrote: > https://codereview.chromium.org/111043002/diff/40001/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc > File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (right): > > https://codereview.chromium.org/111043002/diff/40001/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#newcode218 > ...
7 years ago (2013-12-13 20:59:11 UTC) #17
Elliot Glaysher
I'm not sure whether you need to keep that. However, DNWA::GetCursor() needs to return the ...
7 years ago (2013-12-13 21:08:47 UTC) #18
tdanderson
On 2013/12/13 21:08:47, Elliot Glaysher wrote: > I'm not sure whether you need to keep ...
7 years ago (2013-12-13 21:50:48 UTC) #19
sky
LGTM
7 years ago (2013-12-13 22:16:47 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdanderson@chromium.org/111043002/120001
7 years ago (2013-12-13 22:21:21 UTC) #21
commit-bot: I haz the power
7 years ago (2013-12-14 00:55:42 UTC) #22
Message was sent while issue was closed.
Change committed as 240827

Powered by Google App Engine
This is Rietveld 408576698