After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790920 - Add GdkSeat convenience API
Add GdkSeat convenience API
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GdkDevice
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Carlos Garnacho
Depends on:
Blocks:
 
 
Reported: 2017-11-27 20:57 UTC by Carlos Garnacho
Modified: 2017-12-08 02:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk: Add gdk_seat_get_master_pointers() (5.84 KB, patch)
2017-11-27 20:58 UTC, Carlos Garnacho
committed Details | Review
gdk: Add GDK_SEAT_CAPABILITY_TABLET_PAD (4.63 KB, patch)
2017-11-27 20:58 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2017-11-27 20:57:41 UTC
With GdkDeviceManager being dropped in master, there's a couple things missing to make all devices neatly accessible. Adding patches for those.
Comment 1 Carlos Garnacho 2017-11-27 20:58:09 UTC
Created attachment 364531 [details] [review]
gdk: Add gdk_seat_get_master_pointers()

Traditionally (and on most backends) there's a single master pointer driven
by all pointing devices. The notable exception is wayland though, where
master pointing devices are created per capability in the case of
pointer/touch, and one for each drawing tablet.

This function call makes it easy to access all these.
Comment 2 Carlos Garnacho 2017-11-27 20:58:16 UTC
Created attachment 364532 [details] [review]
gdk: Add GDK_SEAT_CAPABILITY_TABLET_PAD

Tablet pads don't adapt really well to any other capability, so add a
distinct one to be able to query those properly.
Comment 3 Matthias Clasen 2017-11-28 02:36:55 UTC
Review of attachment 364531 [details] [review]:

Otherwise, looks fine to me.

::: gdk/gdkseat.c
@@ +472,3 @@
+ * In other backends where there can possibly be multiple foci
+ * (eg. wayland), this function will return all master
+ * #GdkDevice<!-- -->s that represent these.

no need for the <!-- -->s dance anymore. gdk-pixbuf understands #GdkDevices these days.
Comment 4 Matthias Clasen 2017-11-28 02:39:46 UTC
Review of attachment 364532 [details] [review]:

looks ok to me
Comment 5 Matthias Clasen 2017-12-08 02:27:55 UTC
Attachment 364531 [details] pushed as 4c45022 - gdk: Add gdk_seat_get_master_pointers()
Attachment 364532 [details] pushed as 7531be3 - gdk: Add GDK_SEAT_CAPABILITY_TABLET_PAD