Stop emulating tablet and touch input via pointer input
Emulating tablet input via pointer input creates a few problems:
- the first one is that the same input event can be processed several times. The first time as a tablet tool event, the second time as a pointer event. Such a behavior can be unexpected and it did causes issues in the past with the input in decorations, for example
- the second one is the overall impact on the code. It increases the coupling between independent abstractions, such as tablet and pointer input, and it makes the code far more difficult to adapt to new design principles
- the third one is that it brings a new category of challenges related to managing the wl_pointer state when the tablet tool interferes with its state. This increases the potential for bugs where input misbehaves or just plain crashes
On the other hand, all major clients and toolkits have already added support for the zwp_tablet_v2 protocol. In addition to that, another major wayland compositor, mutter, doesn't even attempt to simulate tablet tool events, and mutter developers have confirmed that they have not received much complaints about this.
Emulating tablet input was necessary when the tablet input protocol was still young and most clients didn't provide support for it, but as it has matured, I believe it's not needed anymore.
As the first step, this change disables tablet input emulation by default. In order to enable tablet input emulation, the KWIN_WAYLAND_EMULATE_TABLET=1 environment variable must be set. Note that tablet input emulation can be buggy because of the changes that went in to prepare the code for fixing tablet tool event filters. Tablet input emulation is expected to be dropped a couple of releases later, which hopefully, will provide enough of time for the clients that still don't support tablet input to add support for it.
It was added because Xwayland didn't support wl_touch, this is no longer relevant.