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

Issue 114873002: Allow synthesized WM_MOUSEMOVE and WM_MOUSELEAVE messages for touch based input through. (Closed)

Created:
7 years ago by ananta
Modified:
6 years, 8 months ago
Reviewers:
girard, tdanderson, sky
CC:
chromium-reviews, tfarina, mohsen
Visibility:
Public.

Description

Allow synthesized WM_MOUSEMOVE and WM_MOUSELEAVE messages for touch based input through. This ensures that focus transitions which occur on mouse moves and leaves works correctly. For e.g. the bookmarks bar, etc. The synthesized WM_MOUSEMOVE and WM_MOUSELEAVE messages should not interfere with the regular touch handling based on my reading of the touch and gesture event code. Fixes bug https://code.google.com/p/chromium/issues/detail?id=326933 BUG=326933 R=sky,girard

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M ui/views/win/hwnd_message_handler.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
ananta
7 years ago (2013-12-13 01:23:40 UTC) #1
sky
It seems as though touch input is very fragile. Can you write tests for this? ...
7 years ago (2013-12-13 16:58:58 UTC) #2
girard
On 2013/12/13 16:58:58, sky wrote: > It seems as though touch input is very fragile. ...
7 years ago (2013-12-13 17:42:58 UTC) #3
sky
I am fine with win8-only tests. As long as we get some level of test ...
7 years ago (2013-12-13 17:54:39 UTC) #4
sky
Ananta said he is going to do test separately, so LGTM
7 years ago (2013-12-13 20:33:55 UTC) #5
tdanderson
On 2013/12/13 20:33:55, sky wrote: > Ananta said he is going to do test separately, ...
7 years ago (2013-12-13 21:02:10 UTC) #6
ananta
On 2013/12/13 21:02:10, tdanderson wrote: > On 2013/12/13 20:33:55, sky wrote: > > Ananta said ...
7 years ago (2013-12-13 21:06:09 UTC) #7
ananta
On 2013/12/13 21:02:10, tdanderson wrote: > On 2013/12/13 20:33:55, sky wrote: > > Ananta said ...
7 years ago (2013-12-13 21:29:00 UTC) #8
tdanderson
On 2013/12/13 21:06:09, ananta wrote: > On 2013/12/13 21:02:10, tdanderson wrote: > > On 2013/12/13 ...
7 years ago (2013-12-13 21:34:04 UTC) #9
ananta
On 2013/12/13 21:34:04, tdanderson wrote: > On 2013/12/13 21:06:09, ananta wrote: > > On 2013/12/13 ...
7 years ago (2013-12-13 21:38:24 UTC) #10
tdanderson
7 years ago (2013-12-17 21:25:50 UTC) #11
On 2013/12/13 21:38:24, ananta wrote:
> On 2013/12/13 21:34:04, tdanderson wrote:
> > On 2013/12/13 21:06:09, ananta wrote:
> > > On 2013/12/13 21:02:10, tdanderson wrote:
> > > > On 2013/12/13 20:33:55, sky wrote:
> > > > > Ananta said he is going to do test separately, so LGTM
> > > > 
> > > > +mohsen@, who I believe wrote some of the Aura-specific code in
> > > > hwnd_message_handler.
> > > > 
> > > > As for this patch, I don't like the idea of letting these
> > > > synthesized events through just to solve this particular
> > > > bug because of the unintended side effects they may have.
> > > > 
> > > > IIUC, I suspect this problem will be fixed once we make the cursor state
> > > > global for desktop Aura (https://codereview.chromium.org/111043002/)
> > > > and then re-enable our internal tracking of cursor visibility
> > > > state on touch (https://codereview.chromium.org/82463002/).
> > > > RootWindow::OnCursorVisibilityChanged(false) will be invoked on
> > > > touch, which will then synthesize our own mouse exit event
> > > > to clear the hover state. I strongly prefer this approach
> > > > rather than letting all synthetic moves/exits though.
> > > > 
> > > > I am in the process of building the code to verify the above.
> > 
> > I have verified that my two patches will (mostly) fix your problem:
> > 
> > - Tap on a bookmark icon. It shows a hovered state.
> > - Long-press in web contents to invoke a context menu.
> > - Tap to dismiss the context menu.
> > 
> > With my patches, the hover effect over the bookmark icon disappears
> > while the longpress timer is active but strangely it re-appears once
> > the context menu appears. But when you tap to dismiss the context 
> > menu the hover effect over the bookmark also disappears.
> > 
> > > 
> > > The GetMessageExtraInfo API which is used to check if a mouse message is
> > > generated
> > > via touch does not return correct values for some mouse messages IIRC
> > > WM_LBUTTONUP/WM_RBUTTONUP, etc.
> > > That is a bug in the API
> > 
> > Yes, I have noticed that as well. I have even seen a WM_MOUSE_MOVE come
> > through as a result of a tap, but without being marked as EF_FROM_TOUCH.
> > 
> > Are you suggesting that because some make it through by accident we should
> > just let all of them through?
> 
> I am not suggesting that. We should make our code robust enough to handle this
> case.

@ananta, it looks like my patches fixed the problem, so you can go ahead
and close this.

Powered by Google App Engine
This is Rietveld 408576698