Commit 1e7631d8 authored by Rui Matos's avatar Rui Matos

common: Handle trackpoint devices in GsdDeviceManagerX11

With gtk+ >= 3.22 trackpoints are classified separately from mice so
we need to handle them here. Also, remove the default case so that we
get a compilation warning in case this happens again.

In the future we might want to expose this further if we start adding
trackpoint specific UI.

https://bugzilla.gnome.org/show_bug.cgi?id=776660
parent 8a60ffe8
......@@ -55,6 +55,7 @@ device_get_device_type (GdkDevice *gdk_device)
switch (source) {
case GDK_SOURCE_MOUSE:
case GDK_SOURCE_TRACKPOINT:
return GSD_DEVICE_TYPE_MOUSE;
case GDK_SOURCE_PEN:
case GDK_SOURCE_ERASER:
......@@ -70,10 +71,9 @@ device_get_device_type (GdkDevice *gdk_device)
return GSD_DEVICE_TYPE_TOUCHPAD;
case GDK_SOURCE_TABLET_PAD:
return GSD_DEVICE_TYPE_PAD;
default:
g_warning ("Unhandled input source %d\n", source);
}
g_warning ("Unhandled input source %d\n", source);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment