diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index 1013fda2af..5c7a5a1614 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -1122,8 +1122,11 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager, GdkDeviceToolType tool_type; tool_type = device_get_tool_type (device); - tool = gdk_device_tool_new (serial_id, tool_id, tool_type, 0); - gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool); + if (tool_type != GDK_DEVICE_TOOL_TYPE_UNKNOWN) + { + tool = gdk_device_tool_new (serial_id, tool_id, tool_type, 0); + gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool); + } } }