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

Issue 8634009: aura: Turn XInput2 back on. (Closed)

Created:
9 years, 1 month ago by sadrul
Modified:
9 years ago
Reviewers:
DaveMoore, sky, Rick Byers
CC:
chromium-reviews, yusukes+watch_chromium.org, derat+watch_chromium.org, bshe
Visibility:
Public.

Description

aura: Turn XInput2 back on. The previous attempt read values from the valuator without properly checking if the valuator is set or not. This resulted in incorrect location at times (when X or Y didn't change). So this change makes sure the valuator is set correctly before reading from it. BUG=103981 TEST=manually (on desktop and device) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112499

Patch Set 1 #

Patch Set 2 : . #

Total comments: 1

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : merge #

Total comments: 3

Patch Set 10 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -6 lines) Patch
M chrome/browser/chromeos/cros_stubs_aura.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/desktop_host_linux.cc View 1 2 3 4 5 6 7 8 9 6 chunks +53 lines, -3 lines 0 comments Download
M ui/base/x/events_x.cc View 1 2 3 1 chunk +20 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
sadrul
9 years, 1 month ago (2011-11-22 17:04:04 UTC) #1
sky
LGTM
9 years, 1 month ago (2011-11-22 17:42:09 UTC) #2
Rick Byers
Hey Sadrul, This CL isn't working for the desktop scenario. I haven't debugged it yet ...
9 years ago (2011-11-25 18:17:05 UTC) #3
sadrul
On 2011/11/25 18:17:05, Rick Byers wrote: > Hey Sadrul, > This CL isn't working for ...
9 years ago (2011-11-25 18:20:26 UTC) #4
Rick Byers
On 2011/11/25 18:20:26, sadrul wrote: > Yes. This is not ready yet. I am still ...
9 years ago (2011-11-25 18:32:56 UTC) #5
sadrul
I have made some more changes: the valuators are used for events coming from both ...
9 years ago (2011-11-30 16:13:31 UTC) #6
sky
LGTM http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux.cc File ui/aura/desktop_host_linux.cc (right): http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux.cc#newcode41 ui/aura/desktop_host_linux.cc:41: static gfx::Point slave_location; Statics should only be primitive ...
9 years ago (2011-11-30 16:38:04 UTC) #7
DaveMoore
http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux.cc File ui/aura/desktop_host_linux.cc (right): http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux.cc#newcode338 ui/aura/desktop_host_linux.cc:338: if (base::MessagePumpForUI::HasXInput2()) Do we ever expect to run in ...
9 years ago (2011-11-30 16:51:50 UTC) #8
sadrul
http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux.cc File ui/aura/desktop_host_linux.cc (right): http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux.cc#newcode338 ui/aura/desktop_host_linux.cc:338: if (base::MessagePumpForUI::HasXInput2()) On 2011/11/30 16:51:51, DaveMoore wrote: > Do ...
9 years ago (2011-11-30 16:53:50 UTC) #9
DaveMoore
LGTM then. On 2011/11/30 16:53:50, sadrul wrote: > http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux.cc > File ui/aura/desktop_host_linux.cc (right): > > ...
9 years ago (2011-11-30 22:59:51 UTC) #10
Daniel Kurtz
9 years ago (2011-12-01 14:51:53 UTC) #11
Can we be more selective about the events that we are requesting from the
server?

I understand wanting both Master pointer events (all mice / touchpads / tablet)
& Floating pointer events (touchscreen).  But why do we want the events for all
of the Slave Pointers attached to a Master?

It seems like we would want to walk the device hierarchy, and only select Master
Pointers, Keyboards and Floating Slave Pointers for input.

This would eliminate the fundamental "problem", which is described in who-t's
blog (http://who-t.blogspot.com/2010/07/input-event-processing-in-x.html):

"During event delivery, the events are taken out of the event queue and
processed one-by-one in the order they were received. The event delivery itself
is staged into slave delivery and master delivery. As said above, an event may
only be generated by a slave device. Once that happens, the event is processed
for this slave device and delivered to any listening clients - if there are
any... Regardless of the event delivery, the same event is then processed again
but this time for the respective master device...  When the event passes through
the master device, it updates the master's internal state and is then delivered
to the client."

I think we can select just masters by specifying XIAllMasterDevices when calling
XISelectEvents() (in the TouchFactory constructor?).  Then, walk the device
hierarchy, and select events for any Floating touchscreen devices.


On 2011/11/30 22:59:51, DaveMoore wrote:
> LGTM then.
> On 2011/11/30 16:53:50, sadrul wrote:
> >
>
http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux.cc
> > File ui/aura/desktop_host_linux.cc (right):
> > 
> >
>
http://codereview.chromium.org/8634009/diff/21004/ui/aura/desktop_host_linux....
> > ui/aura/desktop_host_linux.cc:338: if (base::MessagePumpForUI::HasXInput2())
> > On 2011/11/30 16:51:51, DaveMoore wrote:
> > > Do we ever expect to run in an environment w/out XI2? I expect over time
the
> > > ability to run w/out it will rot. Should this be a fatal error, if not
here
> > then
> > > somewhere higher up?
> > 
> > XInput2 is usually not available when running over NX, for example. So this
> > should not be a fatal error.

Powered by Google App Engine
This is Rietveld 408576698