https://bugs.winehq.org/show_bug.cgi?id=54232
cromachina@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cromachina@gmail.com
--- Comment #1 from cromachina@gmail.com --- I believe there are two main issues which could occur: One caused by your tablet driver, and the other is caused by your window system/desktop environment in conjunction with SAI2's (64bit Preview.2024.04.10) behavior in Wine (now version 9.6). I've found that both issues can be mitigated without any Wine change (however Wine could behave a little better with the second issue).
The first issue is caused by linux-wacom drivers, which seems to cause SAI2 to detect a linear offset to the cursor (the lower down the screen the pen is, the more offset it becomes, this might depend on your display configuration, multiple monitors, etc.). This driver seem to ship with many distros by default. I was NOT able to fix this by setting `AvoidWacomBug = yes` in sai2.ini. However, I have been able to resolve this by using OpenTabletDriver instead (follow the install instructions carefully, you have to disable the linux-wacom drivers and other things). You may need to get a configuration added to OpenTabletDriver for your tablet if it's not supported.
The second issue: After switching drivers, I next observed a constant offset of the cursor in SAI2, but this seems to no longer be caused by the drivers, because it affects the mouse too. What I think is happening is that because SAI2 draws its own window borders and title bar, it does not play nicely with your Linux window system and desktop environment, and SAI2 ends up computing the window origin and geometry incorrectly. I use KDE Plasma, and you can right click on the title bar, select "More Actions > No Titlebar and Frame" and it will fix the constant offset issue. If you use a different desktop environment than myself (which is highly likely), you'll have to figure out how to remove the desktop environment's titlebar and window frame yourself. If you double click the titlebar or set the window to fullscreen with the titlebar button, it seems to cause a weird gap on the left side of the window which causes the constant offset issue to return (again, this might be dependent on your display configuration, multiple monitors, etc.). Instead make your SAI2 window "fullscreen" by grabbing the frame handles and stretching it to the extents of your screen. You can use F11 for one of SAI2's fullscreen modes, but again the constant offset issue may return because of the desktop environment title bar. Yes it's kludgy but it seems to work.
It seems like Wine would need to signal to the window system or desktop environment when the running app desires to draw its own frame and title bar, so that the window system can handle this situation appropriately (particularly in the fullscreen case with the weird window gap). Perhaps this is to be done in the Wine implementation of CreateWindowEx or SetWindowLong Win32 functions.