xwayland: Use `double` for `xwl_tablet_tool`
So we do not lose subpixel precision in Xwayland.
Suggested-by: Peter Hutterer peter.hutterer@who-t.net Signed-off-by: Olivier Fourdan ofourdan@redhat.com Closes: libinput/libinput#138 (closed)
Merge request reports
Activity
mentioned in issue libinput/libinput#138 (closed)
You don't need all of Xserver and you should install it in a separate location from your distro packages (i.e. not in /usr/bin/Xwayland).
So you could use that procedure here: https://wayland.freedesktop.org/xserver.html
Now, if you use GNOME (mutter/gnome-shell) as I suspect, be aware that the path to Xwayland is hardcoded in mutter, so it won't use your separate install of Xwayland unless you rebuild mutter and specify where it should find Xwayland (with
--with-xwayland-path
option to the configure script of mutter)...Well, FWIW, a quick test with
xinput --test-xi2
using an old Wacom Bamboo shows that the RawMotion events have subpixel precision with commit 4db3ef87 so there is some hope in my patch.I am getting a bunch of DRI3-related errors. I suspect that I need to rebuild a dependency, but since I am not familiar with the Xorg build procedure I may be missing something else.
xwayland-glamor-gbm.c: In function ‘sync_callback’: xwayland-glamor-gbm.c:368:5: error: implicit declaration of function ‘dri3_send_open_reply’ [-Werror=implicit-function-declaration] dri3_send_open_reply(client, state->fd); ^~~~~~~~~~~~~~~~~~~~ xwayland-glamor-gbm.c:368:5: warning: nested extern declaration of ‘dri3_send_open_reply’ [-Wnested-externs] xwayland-glamor-gbm.c: At top level: xwayland-glamor-gbm.c:597:14: error: unknown type name ‘dri3_screen_info_rec’ static const dri3_screen_info_rec xwl_dri3_info = { ^~~~~~~~~~~~~~~~~~~~ xwayland-glamor-gbm.c:598:5: error: field name not in record or union initializer .version = 2, ^ xwayland-glamor-gbm.c:598:5: note: (near initialization for ‘xwl_dri3_info’) ...
If you did not notice any obvious regression in your tests, then we might as well tentatively proceed with this change. As soon as it reaches Rawhide or some other rolling release I will test it more extensively.
If you did not notice any obvious regression in your tests, then we might as well tentatively proceed with this change. As soon as it reaches Rawhide or some other rolling release I will test it more extensively.
If you're using Fedora, I can build a test package for you so you can tell if it fixes the problem with the hardware/software you use.
Wow, that would be amazing! I hope it isn't too much of a burden.
Currently, I am using a fully updated Fedora 28 (x86_64) + some select packages from Rawhide (Mesa), but I am considering installing the full Rawhide as a dual boot.
Let me know if you need any specific system information (dependencies versions...) to build the package.
Wow, that would be amazing! I hope it isn't too much of a burden.
No worries :)
Currently, I am using a fully updated Fedora 28 (x86_64) [...]
I've ran a scratch build of the current F28 xorg-x11-server package with 4db3ef87 applied:
https://koji.fedoraproject.org/koji/taskinfo?taskID=29790856
More specifically, the x86_64 packages are found in:
https://kojipkgs.fedoraproject.org//work/tasks/857/29790857/
Please note that scratch builds are automatically removed after a few days.
It is partially working.
Looking at the MyPaint input device test log (I could not copy it so I have attached a screenshot below) with
GDK_BACKEND=x11
, I have subpixel resolution for some events (proximity and button press) but not forMOTION_NOTIFY
events. The aliasing issue is still present (not visible with MyPaint but obvious with Xournal).So I guess there is still at least one place where coordinates are coerced to
int
.Input device test
Notes
-
The half-pixels are probably due to the 2x scaling.
-
The test was performed using the patched X server along with Gnome 3.28.3. I installed the following test packages:
sudo dnf install --nogpgcheck xorg-x11-server-{common,Xorg,Xdmx,Xephyr,Xnest,Xvfb,Xwayland}-1.19.6-9.1test.fc28.x86_64.rpm
-
added 1 commit
- e1bae8be - xwayland: Use `double` for `xwl_tablet_tool`
Thanks for testing!
I've updated the patch, and re-ran a new scratch build here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=29795326
Build is still on-going at this time of writing, but the x86_64 build is complete already:
https://kojipkgs.fedoraproject.org//work/tasks/5327/29795327/
Would you mind giving that one another try?
added 3 commits
-
e1bae8be...6a2ce6c5 - 2 commits from branch
xorg:master
- 46cbe8f8 - xwayland: Use `double` for `xwl_tablet_tool`
-
e1bae8be...6a2ce6c5 - 2 commits from branch