From: Carlos Lopez Date: Wed, 24 Feb 2010 17:49:47 +0000 (+0100) Subject: Disable by default all extended input devices. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=66d124c5d5756ce20d62586dde685459d10a0f55;hp=96ecf115bd5db526fa2d5fe4757fd6ef60afd7cd;p=synfig.git Disable by default all extended input devices. Be sure that the core pointer is the only one selected by default. Just when the user enables any extended input device it should save the settings and remember its configuration. Tries to fix several bug reports in tracker and forum. --- diff --git a/synfig-studio/src/gtkmm/devicetracker.cpp b/synfig-studio/src/gtkmm/devicetracker.cpp index 8bd9a46..48bfa13 100644 --- a/synfig-studio/src/gtkmm/devicetracker.cpp +++ b/synfig-studio/src/gtkmm/devicetracker.cpp @@ -71,11 +71,20 @@ DeviceTracker::DeviceTracker() synfigapp::InputDevice::Handle input_device; input_device=synfigapp::Main::add_input_device(device->name,synfigapp::InputDevice::Type(device->source)); - if(input_device->get_type()==synfigapp::InputDevice::TYPE_MOUSE) { - input_device->set_mode(synfigapp::InputDevice::MODE_SCREEN); - synfigapp::Main::select_input_device(input_device); + //Disable all extended devices by default. This tries to fix several + // bugs reported in track and forums + if( input_device->get_type()==synfigapp::InputDevice::TYPE_MOUSE || + input_device->get_type()==synfigapp::InputDevice::TYPE_PEN || + input_device->get_type()==synfigapp::InputDevice::TYPE_ERASER || + input_device->get_type()==synfigapp::InputDevice::TYPE_CURSOR ) { + input_device->set_mode(synfigapp::InputDevice::MODE_DISABLED); + //synfigapp::Main::select_input_device(input_device); } } + // Once all devices are disabled be sure that the core pointer is the + // one selected. The user should decide later whether enable and save the + // rest of input devices found. + synfigapp::Main::select_input_device(gdk_device_get_core_pointer()->name); } DeviceTracker::~DeviceTracker()