Axis events to keyboard focus (Re: Input and games.)
Bill Spitzak
spitzak at gmail.com
Thu May 9 17:41:23 PDT 2013
Peter Hutterer wrote:
> assuming we have two clients C1, C2, and C1 has the gamepad open, what is
> the behaviour of the gamepad and the shared pointer:
> - when the gp-controlled pointer enters/leaves C1's surface
> - when the gp-controlled pointer enters and clicks inside the surface
> - when the compositor changes the keyboard and/or gamepad focus to C1's
> surface while the gp-controlled pointer is inside or outside the surface,
> respectively
Because C1 has the gamepad open, the pointer is no longer shared, and it
thus acts exactly like the pointer is only controlled by the mouse.
There is no gp-controlled pointer.
> - when the mouse-controlled pointer enters and/or clicks C1's surface
C1 gets enter and button events just like normal.
> - when the mouse-controlled pointer leaves the surface while a gamepad
> button is held down
I think it may be desirable to have any buttons on any devices (ie
keyboard keys as well) perform a temporary-grab much like mouse buttons
so the pointer focus does not change until all the buttons are released.
In this case C1 will get the mouse-move events and any buttons until it
gets the release of all of them.
If there is no such multi-device button grab, then C1 sees a mouse-leave
event. It will also get the up event for the gamepad button since it
still has the gamepad focus.
> - when the gamepad presses a button after the mouse-controlled pointer has
> left the surface
The gamepad entries still go to the gamepad focus which is C1
> - if a keyboard event triggers a compositor shortcut immediately followed by
> a gamepad button event (e.g. alt-tab followed by gamepad button 1 press,
> does this select the window currently underneath the pointer?)
If this moves the gamepad focus to another client that has not opened
the gamepad, I think it does restore the control of the pointer. So the
click does go to the window under the pointer.
> - what is the position of the cursor between the gamepad detached and
> reattached to pointer mode
If follows the mouse only.
More information about the wayland-devel
mailing list