New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 812964 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: 4
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

mousemove events sometimes have values of 0 when in pointer lock and full screen

Project Member Reported by tyralyn@chromium.org, Feb 16 2018

Issue description

Chrome Version: (copy from 64.0.3282.167), but also with some versions of 63 and 65
OS: Win10

What steps will reproduce the problem?
I have a minimum repro case at jsbin.com/fadepox.

(1) Resize your Chrome window to a smaller size.
(2) Request pointer lock and then full screen. (In jsbin.com/fadepox, click the 'LOCK POINTER, FULLSCREEN' button.)
(3) Move the mouse around.

(1) Resize your Chrome window to a smaller size.
(2) Open the element inspection tool.
(3) Request full screen and then pointer lock. (In jsbin.com/fadepox, click the 'FULLSCREEN, LOCK POINTER' button.)
(4) Move the mouse around.

What is the expected result?

mousemove events should provide movementX and movementY values that match the user's motion. (The box on the jsbin should move around with mouse movements.)

What happens instead?

mousemove events sometimes provide a 0 instead of real movementX or movementY values. (The colored box on the jsbin.com/fadepox looks as though it is constrained to a box smaller than the screen. movementX and movementY are are also logged to the console in the jsbin, and will sometimes present a 0 in the movementX or movementY  when the mouse is moved in those directions.)

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
Summary: mousemove events sometimes have values of 0 when in pointer lock and full screen (was: mousemove events have values of 0 when in pointer lock and full screen)
Description: Show this description
Description: Show this description
Cc: eirage@chromium.org
tyralyn I don't quite see what you are seeing. I see non zero values if I keep moving the mouse horizontally/vertically for movementX movementY respectively. Even when the rectangle is hitting the boundaries in your code (i.e. ==0 or ==innerwidth/height) it prints non-zero movementX/Ys in the console.

Can you elaborate a little more? Maybe a few pictures or a screen cast so that we can understand this better.

Comment 5 by eirage@chromium.org, Feb 22 2018

Owner: eirage@chromium.org
Status: Assigned (was: Untriaged)
Hmmmm, I can reproduce this issue. You need to resize window to a smaller size then click fullscreen & lock.
Hi all, I am seeing a new issue where pointer lock mode + full screen is no longer moving the square as intended. I made a screencast to show the comparison: https://screencast.googleplex.com/cast/NDg1MjUyMjU3NzU1OTU1MnwxMWE4OWUwNy1iMQ

The expected behavior is that both boxes should move according to the cursor.

Could someone please help us look into this issue?

Comment 7 by eirage@chromium.org, Apr 26 2018

#6 katherine@: Looks like request lock + full screen will unlock immediately. and probably a mac only issue.
It seems a different issue, could you please open a new issue?
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b15a757db42e85ea817d2be77eeee6ace8791200

commit b15a757db42e85ea817d2be77eeee6ace8791200
Author: Ella Ge <eirage@chromium.org>
Date: Mon Jun 25 17:03:50 2018

RWHV should use IsMouseLocked istead of mouse_locked_

RenderWidgetHostViewAura should use IsMouseLocked instead of
mouse_locked_ because the locked state is stored in RWHV_event_handler.

Remove mouse_locked_ from the base class to prevent misuse.

Bug:  812964 
Change-Id: I5201c7b6d77d1e52f9da2344899b6ab293e44f86
Reviewed-on: https://chromium-review.googlesource.com/1102911
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570072}
[modify] https://crrev.com/b15a757db42e85ea817d2be77eeee6ace8791200/content/browser/pointer_lock_browsertest.cc
[modify] https://crrev.com/b15a757db42e85ea817d2be77eeee6ace8791200/content/browser/pointer_lock_browsertest_mac.mm
[modify] https://crrev.com/b15a757db42e85ea817d2be77eeee6ace8791200/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/b15a757db42e85ea817d2be77eeee6ace8791200/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/b15a757db42e85ea817d2be77eeee6ace8791200/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/b15a757db42e85ea817d2be77eeee6ace8791200/content/browser/renderer_host/render_widget_host_view_event_handler.h
[modify] https://crrev.com/b15a757db42e85ea817d2be77eeee6ace8791200/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/b15a757db42e85ea817d2be77eeee6ace8791200/content/browser/renderer_host/render_widget_host_view_mac.mm

Comment 9 by eirage@chromium.org, Jun 25 2018

Status: Fixed (was: Assigned)

Sign in to add a comment