I’ve been trying out SDL2 Wayland with both the Weston reference
compositor and gnome-shell/mutter-wayland. Graphics performance is
excellent, however mouse input is pretty much unusable.
Looking through the the current code bases, it seems right now the
Wayland support code in SDL only supports reading the current pointer
position relative to the focused surface, rather than distance moved
during the last time interval, this just about work as a workaround if
it the pointer wasn’t bounded by the surface dimensions and could warp
from side to side, top to bottom, but it can’t. Move the mouse too
far in any direction, and you hit the edge.
At least Weston and gnome-shell now both use libinput to abstract
input devices, this supports “relative mode” without issues, but I
can’t find any documentation showing how this translates into an
accessible Wayland protocol API. Maybe somebody here knows?
While looking into all this, it occurs to me it would be rather useful
to have a driver for libinput directly, even if this would be
unsuitable for use with a compositor/xserver (where input is expected
to always go through the appropriate API)*, it would provide a nice
abstraction to evdev for use with touchscreens etc when using fbdev or
kms.
- Am I right here? Or would this be an alternative “raw” API?
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140717/15415d50/attachment.pgp
2014-07-17 11:37 GMT-03:00 Steven Newbury :
I’ve been trying out SDL2 Wayland with both the Weston reference
compositor and gnome-shell/mutter-wayland. Graphics performance is
excellent, however mouse input is pretty much unusable.
Looking through the the current code bases, it seems right now the
Wayland support code in SDL only supports reading the current pointer
position relative to the focused surface, rather than distance moved
during the last time interval, this just about work as a workaround if
it the pointer wasn’t bounded by the surface dimensions and could warp
from side to side, top to bottom, but it can’t. Move the mouse too
far in any direction, and you hit the edge.
There’s no relative mouse/pointer grabbing support in Wayland AFAIK, there
certainly was none when the backend landed (around the 1.4 Wayland
release). They discussed it for 1.5 and it didn’t land, I’m not aware of
any recent developments.
While looking into all this, it occurs to me it would be rather useful
to have a driver for libinput directly, even if this would be
unsuitable for use with a compositor/xserver (where input is expected
to always go through the appropriate API)*, it would provide a nice
abstraction to evdev for use with touchscreens etc when using fbdev or
kms.
SDL has support for evdev events for joystick/mouse/keyboard. Mouse and
keyboard are only used with the Raspberry Pi backend right now.–
Gabriel.
2014-07-17 11:37 GMT-03:00 Steven Newbury <@Steven_Newbury>:
I’ve been trying out SDL2 Wayland with both the Weston reference
compositor and gnome-shell/mutter-wayland. Graphics performance
is
excellent, however mouse input is pretty much unusable.
Looking through the the current code bases, it seems right now the
Wayland support code in SDL only supports reading the current
pointer
position relative to the focused surface, rather than distance
moved
during the last time interval, this just about work as a
workaround if
it the pointer wasn’t bounded by the surface dimensions and could
warp
from side to side, top to bottom, but it can’t. Move the mouse
too
far in any direction, and you hit the edge.
There’s no relative mouse/pointer grabbing support in Wayland AFAIK,
there
certainly was none when the backend landed (around the 1.4 Wayland
release). They discussed it for 1.5 and it didn’t land, I’m not
aware of
any recent developments.
I figured this must still be the case, but the low-level code has
landed in libinput which got my hopes up.
While looking into all this, it occurs to me it would be rather
useful
to have a driver for libinput directly, even if this would be
unsuitable for use with a compositor/xserver (where input is
expected
to always go through the appropriate API)*, it would provide a
nice
abstraction to evdev for use with touchscreens etc when using
fbdev or
kms.
SDL has support for evdev events for joystick/mouse/keyboard. Mouse
and
keyboard are only used with the Raspberry Pi backend right now.
Well, if there’s no interest I won’t bother hacking anything up, just
thought it might be useful. 
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140717/dca22973/attachment-0001.pgpOn Thu, 2014-07-17 at 11:45 -0300, Gabriel Jacobo wrote:
Ryan and I are talking with the Wayland folks. They understand the
importance of relative mouse motion and are adding it to the API.On Thu, Jul 17, 2014 at 7:45 AM, Gabriel Jacobo wrote:
2014-07-17 11:37 GMT-03:00 Steven Newbury :
I’ve been trying out SDL2 Wayland with both the Weston reference
compositor and gnome-shell/mutter-wayland. Graphics performance is
excellent, however mouse input is pretty much unusable.
Looking through the the current code bases, it seems right now the
Wayland support code in SDL only supports reading the current pointer
position relative to the focused surface, rather than distance moved
during the last time interval, this just about work as a workaround if
it the pointer wasn’t bounded by the surface dimensions and could warp
from side to side, top to bottom, but it can’t. Move the mouse too
far in any direction, and you hit the edge.
There’s no relative mouse/pointer grabbing support in Wayland AFAIK, there
certainly was none when the backend landed (around the 1.4 Wayland
release). They discussed it for 1.5 and it didn’t land, I’m not aware of
any recent developments.
While looking into all this, it occurs to me it would be rather useful
to have a driver for libinput directly, even if this would be
unsuitable for use with a compositor/xserver (where input is expected
to always go through the appropriate API)*, it would provide a nice
abstraction to evdev for use with touchscreens etc when using fbdev or
kms.
SDL has support for evdev events for joystick/mouse/keyboard. Mouse and
keyboard are only used with the Raspberry Pi backend right now.
–
Gabriel.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org