After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778511 - Wintab input is not scaled according to GDK_SCALE. Even on single-monitor setups. HiDPI setups affected too?
Wintab input is not scaled according to GDK_SCALE. Even on single-monitor set...
Status: RESOLVED DUPLICATE of bug 778508
Product: gtk+
Classification: Platform
Component: Backend: Win32
3.22.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-02-11 22:20 UTC by Andrew Chadwick
Modified: 2017-02-11 22:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrew Chadwick 2017-02-11 22:20:38 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.
Comment 1 Andrew Chadwick 2017-02-11 22:24:01 UTC
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?
Comment 2 LRN 2017-02-11 22:31:16 UTC
Is this a duplicate of bug 778508?
Comment 3 Andrew Chadwick 2017-02-11 22:33:51 UTC
Ah, didn't see that.

*** This bug has been marked as a duplicate of bug 778508 ***