gdk/wayland: Create pad devices on enter
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 13 Jun 2023 22:16:58 +0000 (00:16 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 13 Jun 2023 23:42:53 +0000 (01:42 +0200)
commit9f4320a4acbc104a8fce09c0a948d0f99e0feb98
tree0b0444b803945af85db0feea06ae9304a4f5c36f
parent8f6cc19fdb05fe58f0bd35d7fc5433a1592636ab
gdk/wayland: Create pad devices on enter

We were creating the pad device on wp_tablet_pad.done, but
at that time we do not know what tablet it is associated with,
thus we cannot get appropriate vid/pid/name properties for it.

To get that, we need to wait for the pad to enter a surface,
at that time we do know what tablet it is associated with, so
we can get better information about the device.

There are pads that may plausibly "change" tablet between
one .enter event and the next (e.g. Wacom Express Key Remote),
but this situation is highly unlikely. The pad devices created
are thus persistent until that situation happens.
gdk/wayland/gdkseat-wayland.c