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

Issue 1870743003: Ensure that the cursor visibility state is restored correctly on CursorManager creation. (Closed)

Created:
4 years, 8 months ago by ananta
Modified:
4 years, 8 months ago
Reviewers:
sky
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure that the cursor visibility state is restored correctly on CursorManager creation. We hide the cursor when we receive a touch down message and show it when we receive a normal mouse message, i.e. a mouse message which is not synthesized by Windows in response to touch. The CursorManager is the class which manages the cursor visibility state, etc. We have a single instance of this class which has shared by all desktop chrome windows. When all the windows are closed, the cursor manager instance is destroyed. When a new CursorManager instance is created on the same thread, it sets the cursor visibility as true, regardless of the last visibility state, i.e. a user may have touched the window and then closed it, etc. Fix is to remember the last state of the cursor in a static variable in the CursorManager class, and use it to initialize any new CursorManager instances. BUG=447153 TEST=Covered by wm unittest CursorManagerCreateDestroyTest.VisibilityTest Committed: https://crrev.com/712e1caac53b0cd18f48046c877bdeb2dad55fdb Cr-Commit-Position: refs/heads/master@{#386156}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -1 line) Patch
M ui/wm/core/cursor_manager.h View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/wm/core/cursor_manager.cc View 3 chunks +8 lines, -1 line 0 comments Download
M ui/wm/core/cursor_manager_unittest.cc View 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
ananta
4 years, 8 months ago (2016-04-08 00:59:18 UTC) #2
sky
LGTM
4 years, 8 months ago (2016-04-08 16:12:58 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870743003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870743003/1
4 years, 8 months ago (2016-04-08 18:51:32 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-08 18:58:08 UTC) #6
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 18:59:35 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/712e1caac53b0cd18f48046c877bdeb2dad55fdb
Cr-Commit-Position: refs/heads/master@{#386156}

Powered by Google App Engine
This is Rietveld 408576698