https://bugs.winehq.org/show_bug.cgi?id=53642
Bug ID: 53642 Summary: 'wintab.c:is_tablet_cursor' fails with xwayland devices Product: Wine Version: 7.16 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wintab32 Assignee: wine-bugs@winehq.org Reporter: bugg.void@tutanota.com Distribution: ---
Created attachment 73043 --> https://bugs.winehq.org/attachment.cgi?id=73043 wintab32 debug output, is_tablet_cursor test
I can't get pen pressure to work with xwayland. Running with WINEDEBUG=+wintab32 shows that wintab fails because it 'Did not find a valid stylus, unable to determine system context parameters. Wintab is disabled.' ( see attachment ). It seems to me that the 'is_tablet_cursor' function fails with xwayland device names. Below is my best attempt at explaining why it happens.
Looking at one of the devices ( see attachment for more )
Device 9: [id 10|name xwayland-tablet stylus:10|type "xwayland-pointer"|num_classes 2|use 4] Is XExtension: Device, Keyboard, or Pointer Skipping device 9 [name xwayland-tablet stylus:10|type "xwayland-pointer"]; not apparently a tablet cursor type device
we get: name: xwayland-tablet stylus:10 type: xwayland-pointer
This will result in: is_tablet_cursor( "xwayland-tablet stylus:10", "xwayland-pointer" ) which will fail, because 'match_token' gets confused by extra ':10' in the name
I used source at https://source.winehq.org/git/wine.git/blob/a4930f003f45ab82c4c05746cbd29cbd... to analyze this case. I can't build wine currently so I wasn't able to test any fixes. The best I was able to do is extracting 'is_tablet_cursor' and testing it in isolation ( https://www.ideone.com/Gc69l0 ).
Let me know if you need any more info.