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 673919 - don't set touchscreens in relative mode
don't set touchscreens in relative mode
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: wacom
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-04-11 16:43 UTC by Timo Aaltonen
Modified: 2012-04-16 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the actual patch (848 bytes, patch)
2012-04-11 16:44 UTC, Timo Aaltonen
committed Details | Review

Description Timo Aaltonen 2012-04-11 16:43:52 UTC
commit 5dd89a267e7c539e68 changed all touch devices to use the relative mode, but touchscreens should stay absolute so the attached patch is needed.
Comment 1 Timo Aaltonen 2012-04-11 16:44:54 UTC
Created attachment 211850 [details] [review]
the actual patch
Comment 2 Bastien Nocera 2012-04-12 09:58:01 UTC
We don't use Signed-Off-By lines in GNOME. Please also make sure to prefix
the commit subject with the plugin name (for gnome-settings-daemon) or the
panel name (for gnome-control-center) in future commit messages.
Comment 3 Bastien Nocera 2012-04-16 12:42:49 UTC
Just realised this patch is crap.

You're passing a GsdWacomDevice to a function that expects a WacomDevice from libwacom. libwacom is also not used anywhere in gsd-wacom-manager.c, and the patches generates a warning.
Comment 4 Bastien Nocera 2012-04-16 12:52:08 UTC
commit bc5d65ce60b34da3257b5d13a6dbe8ff69e93f2d
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Apr 16 13:44:24 2012 +0100

    wacom: Really don't set touchscreens into relative mode
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673919#c3
Comment 5 André Klapper 2012-04-16 13:09:23 UTC
(In reply to comment #3)
> Just realised this patch is crap.

Not very helpful language. For future reference please use terms like "bad quality" or plain "wrong". "Be respectful and considerate." Thanks.
Comment 6 Timo Aaltonen 2012-04-16 13:12:58 UTC
alright, sorry for missing the include, but FWICT the is_screen_tablet approach won't work, since it's appears to be '0' for touchscreens. We tried it here:

http://pastebin.com/YL23L7Ua

so there's another bug then?
Comment 7 Bastien Nocera 2012-04-16 13:42:12 UTC
(In reply to comment #6)
> alright, sorry for missing the include,

It's not a missing include. You were using the wrong type of structure. You were passing a GsdWacomDevice (a GObject defined in gsd-wacom-device.[ch]) to a function that's supposed to deal with WacomDevice structures, as used in libwacom.

> but FWICT the is_screen_tablet approach
> won't work, since it's appears to be '0' for touchscreens. We tried it here:

libwacom_is_builtin() is returning 1 because you're reading random data from a structure that isn't of the expected type.

See also:
	device->priv->is_screen_tablet = libwacom_is_builtin (wacom_device);
and:
gboolean
gsd_wacom_device_is_screen_tablet (GsdWacomDevice *device)
{
	g_return_val_if_fail (GSD_IS_WACOM_DEVICE (device), FALSE);

	return device->priv->is_screen_tablet;
}

If libwacom_is_builtin() and gsd_wacom_device_is_screen_tablet() have different values, that's because you were passing garbage to the libwacom function.

> so there's another bug then?

I guess so.
Comment 8 Timo Aaltonen 2012-04-16 14:16:54 UTC
right, got it this time, thanks.

I don't have such hw myself, but will see to it that it'll get tested again and the other bug hopefully fixed in the process, properly this time :)