Only block internal touchpad and allow external mice to continue working in maximize mode.
BUG=362881
TEST=Manual, plug in an external mouse and observe it continues working when device is in maximize mode while internal touchpad does not.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272254
Please take a look. It looks like the test event generation infrastructure doesn't currently support ...
6 years, 7 months ago
(2014-05-01 12:36:41 UTC)
#1
Please take a look. It looks like the test event generation infrastructure
doesn't currently support creating custom native events (i.e. with XI2 events
containing deviceids) so I don't have a test for this. Let me know if you think
I should add some kind of native event injection in order to test this.
sadrul
Can you use DeviceDataManager::IsCMTDeviceEvent() instead to detect events coming from the internal touchpad? https://codereview.chromium.org/269633005/diff/1/ash/wm/maximize_mode/maximize_mode_event_blocker.cc File ...
6 years, 7 months ago
(2014-05-02 01:44:47 UTC)
#2
Oddly enough DeviceDataManager::IsCMTDeviceEvent() returns true. DeviceDataManager::IsTouchpadXInputEvent works to discriminate the internal touchpad from external regular ...
6 years, 7 months ago
(2014-05-07 01:39:23 UTC)
#3
Oddly enough DeviceDataManager::IsCMTDeviceEvent() returns true.
DeviceDataManager::IsTouchpadXInputEvent works to discriminate the internal
touchpad from external regular mice, though I'm not sure what this will do with
an external touchpad.
Eventually, we'll have to detect the keyboard as well, so even if we do detect
the internal touchpad some other way we'll probably still have to use the device
name to identify the keyboard.
https://codereview.chromium.org/269633005/diff/1/ash/wm/maximize_mode/maximiz...
File ash/wm/maximize_mode/maximize_mode_event_blocker.cc (right):
https://codereview.chromium.org/269633005/diff/1/ash/wm/maximize_mode/maximiz...
ash/wm/maximize_mode/maximize_mode_event_blocker.cc:10: #endif
On 2014/05/02 01:44:47, sadrul wrote:
> I think these still go below, grouped with the block in lines 21:25
Done.
flackr
On 2014/05/07 01:39:23, flackr wrote: > Oddly enough DeviceDataManager::IsCMTDeviceEvent() returns true. To clarify, I mean ...
6 years, 7 months ago
(2014-05-07 01:45:00 UTC)
#4
On 2014/05/07 01:39:23, flackr wrote:
> Oddly enough DeviceDataManager::IsCMTDeviceEvent() returns true.
To clarify, I mean returns true for my external USB mouse.
> DeviceDataManager::IsTouchpadXInputEvent works to discriminate the internal
> touchpad from external regular mice, though I'm not sure what this will do
with
> an external touchpad.
>
> Eventually, we'll have to detect the keyboard as well, so even if we do detect
> the internal touchpad some other way we'll probably still have to use the
device
> name to identify the keyboard.
>
>
https://codereview.chromium.org/269633005/diff/1/ash/wm/maximize_mode/maximiz...
> File ash/wm/maximize_mode/maximize_mode_event_blocker.cc (right):
>
>
https://codereview.chromium.org/269633005/diff/1/ash/wm/maximize_mode/maximiz...
> ash/wm/maximize_mode/maximize_mode_event_blocker.cc:10: #endif
> On 2014/05/02 01:44:47, sadrul wrote:
> > I think these still go below, grouped with the block in lines 21:25
>
> Done.
sadrul
This looks reasonable ... but how difficult would it be to separate out the device-id ...
6 years, 7 months ago
(2014-05-07 13:59:22 UTC)
#5
Separated out the device detection into an X11 only file. https://codereview.chromium.org/269633005/diff/20001/ash/wm/maximize_mode/maximize_mode_event_blocker.cc File ash/wm/maximize_mode/maximize_mode_event_blocker.cc (right): https://codereview.chromium.org/269633005/diff/20001/ash/wm/maximize_mode/maximize_mode_event_blocker.cc#newcode52 ...
6 years, 7 months ago
(2014-05-14 16:46:56 UTC)
#6
Separated out the device detection into an X11 only file.
https://codereview.chromium.org/269633005/diff/20001/ash/wm/maximize_mode/max...
File ash/wm/maximize_mode/maximize_mode_event_blocker.cc (right):
https://codereview.chromium.org/269633005/diff/20001/ash/wm/maximize_mode/max...
ash/wm/maximize_mode/maximize_mode_event_blocker.cc:52: aura::Window*
root_window_;
On 2014/05/07 13:59:23, sadrul wrote:
> We expect that the root-window will outlive this targeter, right?
Yes, commented.
https://codereview.chromium.org/269633005/diff/20001/ash/wm/maximize_mode/max...
ash/wm/maximize_mode/maximize_mode_event_blocker.cc:98: last_mouse_location_);
On 2014/05/07 13:59:23, sadrul wrote:
> Add a comment here about why we are doing this (it isn't immediately clear
that
> we don't want the cursor to move in this mode).
Done.
https://codereview.chromium.org/269633005/diff/20001/ash/wm/maximize_mode/max...
ash/wm/maximize_mode/maximize_mode_event_blocker.cc:104: &last_mouse_location_);
On 2014/05/07 13:59:23, sadrul wrote:
> Use WindowTreeHost::ConvertPointToHost on the event's root_location() instead?
Done.
https://codereview.chromium.org/269633005/diff/20001/ash/wm/maximize_mode/max...
ash/wm/maximize_mode/maximize_mode_event_blocker.cc:131:
base::TrimWhitespaceASCII(device_name, base::TRIM_TRAILING, &device_name);
On 2014/05/07 13:59:23, sadrul wrote:
> How safe is it to assume that the name is ASCII?
It should be safe, TrimWhitespaceASCII uses std::string::find_last_not_of
basically ignoring encoding. Afaik at worst trimming a UTF8 string would give an
invalid UTF8 string but since we don't use the string as anything but ASCII it
wouldn't matter.
sadrul
LGTM. Thanks! +kpschoedel@ FYI. The newly added InternalInputDeviceList will need to be merged with the ...
6 years, 7 months ago
(2014-05-14 18:26:08 UTC)
#7
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/builds/31554)
6 years, 7 months ago
(2014-05-14 22:10:15 UTC)
#13
Hey, after merging I had to modify how the internal input device list is accessed ...
6 years, 7 months ago
(2014-05-16 21:18:59 UTC)
#14
Hey, after merging I had to modify how the internal input device list is
accessed so that it can be mocked out for
MaximizeModeControllerTest.BlocksKeyboardAndMouse. Still look good?
flackr
ping, do the changes in maximize_mode_controller_unittest.cc and maximize_mode_event_blocker.h/cc in patch set 5 look reasonable? (Pardon ...
6 years, 7 months ago
(2014-05-20 20:41:54 UTC)
#15
ping, do the changes in maximize_mode_controller_unittest.cc and
maximize_mode_event_blocker.h/cc in patch set 5 look reasonable? (Pardon the
ugliness of the merge, the upstream change added tests which require mouse
events to be identified as internal and blocked)
sadrul
sorry about the delay. slgtm
6 years, 7 months ago
(2014-05-21 15:29:17 UTC)
#16
sorry about the delay. slgtm
flackr
The CQ bit was checked by flackr@chromium.org
6 years, 7 months ago
(2014-05-21 15:30:31 UTC)
#17
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/69070) linux_chromium_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_clang_dbg/builds/27438) linux_chromium_gn_rel ...
6 years, 7 months ago
(2014-05-22 01:21:14 UTC)
#21
Issue 269633005: Only block internal touchpad and allow external mice to continue working in maximize mode.
(Closed)
Created 6 years, 7 months ago by flackr
Modified 6 years, 7 months ago
Reviewers: sadrul
Base URL: svn://svn.chromium.org/chrome/trunk/src
Comments: 12