GNOME Bugzilla – Bug 778511
Wintab input is not scaled according to GDK_SCALE. Even on single-monitor setups. HiDPI setups affected too?
Last modified: 2017-02-11 22:33:51 UTC
It appears that the Wintab event handling code does not respect scaling even on single-monitor setups, whether they derive from GDK_SCALE or from the display resolution. Steps to reproduce (for single 1080p and below displays, Win7, Intuos5 + latest Wacom drivers): 1. Install tablet drivers, reboot as needed. Plug in your graphics tablet if needed. 2. Start an MSYS2 "MINGW64" shell. 3. Make sure that mingw-w64-x86_64-gtk3 is installed via `pacman`. - I'm using 3.22.7 - The MINGW32 environment of MSYS2 is affected too. 3. Send a few motion events without starting anything. - The wintab glue or the main driver itself seems to need this. 4. In the MINGW63 shell, run: $ GDK_SCALE=2.0 gtk3-demo --run=event_axes 5. Try to move and send pressure/clicks within the Event Axes window using the graphics tablet. Expected behaviour: * The crosshairs and coloured blobs representing pressure coincide with where the pointer is on screen. * It is possible to move the Event Axes window sensibly with the graphics tablet. Actual behaviour + observations: * The event_axes tester's crosshairs appear down and to the right of the pointer. * It's almost impossible to move or close the Event Axes window with the tablet because of the same input. * It looks as if a scale of 2.0 hasn't been applied between the input coordinates and where it has an effect in windows under GTK's control ☺ * The absolute offset diminishes towards the top-left of the display ((0, 0)?) * Mouse input is perfectly OK. * Using GDK_SCALE=1.0 This may affect systems whose "natural" scaling is 2.0 or above. See the screenshot attachments in bug 778328: the reporter is using a HiDPI system. attachment 345479 [details], taken after the patch for bug 778328, is especially indicative of this scaling issue also deriving from: it's a 2934x1956 display. Ignore the ugly redraw noise around the the stroke, that's a separate MyPaint bug! My Windows systems are all 1920x1080 (or only capable of driving a texture that size over HDMI even to a 4K TV), so sadly I cannot test the "natural" HiDPI case on Windows.
In bug 778328 comment 26, carlosg mentioned: > This is indeed a separate issue, I think down to > https://git.gnome.org//browse/gtk+/tree/gdk/win32/gdkdevicemanager-win32.c#n1014 > not scaling down the x/y coordinates on hidpi setups. As good a place as anywhere to start looking. Carlos: can you show me where in the code the scaling is being applied for non-wintab input?
Is this a duplicate of bug 778508?
Ah, didn't see that. *** This bug has been marked as a duplicate of bug 778508 ***