From 6636e57f20c528e13a5a41e15c166cfc39e1f15b Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sun, 27 May 2012 16:18:31 +0100 Subject: Stop using obsolete GdkDevice API. Needs testing with extended input devices (bzr r11425) --- src/device-manager.cpp | 52 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 13 deletions(-) (limited to 'src/device-manager.cpp') diff --git a/src/device-manager.cpp b/src/device-manager.cpp index bca7eb323..458954580 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -26,9 +26,9 @@ struct GdkDeviceFake { GdkInputMode mode; gboolean has_cursor; gint num_axes; - GdkDeviceAxis *axes; +// GdkDeviceAxis *axes; gint num_keys; - GdkDeviceKey *keys; +// GdkDeviceKey *keys; }; @@ -346,7 +346,13 @@ DeviceManagerImpl::DeviceManagerImpl() : DeviceManager(), devices() { +#if GTK_CHECK_VERSION(3,0,0) + GdkDisplay *display = gdk_display_get_default(); + GdkDeviceManager *dm = gdk_display_get_device_manager(display); + GList* devList = gdk_device_manager_list_devices(dm, GDK_DEVICE_TYPE_SLAVE); +#else GList* devList = gdk_devices_list(); +#endif if ( !fakeList ) { createFakeList(); @@ -368,6 +374,10 @@ DeviceManagerImpl::DeviceManagerImpl() : devices.push_back(Glib::RefPtr(device)); } } + +#if GTK_CHECK_VERSION(3,0,0) + g_list_free(devList); +#endif } void DeviceManagerImpl::loadConfig() @@ -655,7 +665,10 @@ DeviceManager& DeviceManager::getManager() { - +/* FIXME: Device Axis and Key details are inaccessible in GTK+ 3 + * and are deprecated in GTK+ 2. Perhaps there is a way of specifying + * this in underlying API? + * GdkDeviceAxis padAxes[] = {{GDK_AXIS_X, 0.0, 0.0}, {GDK_AXIS_Y, 0.0, 0.0}, {GDK_AXIS_PRESSURE, 0.0, 1.0}, @@ -695,6 +708,7 @@ GdkDeviceKey stylusKeys[] = {{0, (GdkModifierType)0}, {0, (GdkModifierType)0}, { GdkDeviceAxis coreAxes[] = {{GDK_AXIS_X, 0.0, 0.0}, {GDK_AXIS_Y, 0.0, 0.0}}; +*/ static void createFakeList() { if ( !fakeList ) { @@ -703,39 +717,46 @@ static void createFakeList() { fakeout[0].mode = GDK_MODE_SCREEN; fakeout[0].has_cursor = TRUE; fakeout[0].num_axes = 6; - fakeout[0].axes = padAxes; +// fakeout[0].axes = padAxes; fakeout[0].num_keys = 8; - fakeout[0].keys = padKeys; +// fakeout[0].keys = padKeys; fakeout[1].name = g_strdup("eraser"); fakeout[1].source = GDK_SOURCE_ERASER; fakeout[1].mode = GDK_MODE_SCREEN; fakeout[1].has_cursor = TRUE; fakeout[1].num_axes = 6; - fakeout[1].axes = eraserAxes; +// fakeout[1].axes = eraserAxes; fakeout[1].num_keys = 7; - fakeout[1].keys = eraserKeys; +// fakeout[1].keys = eraserKeys; fakeout[2].name = g_strdup("cursor"); fakeout[2].source = GDK_SOURCE_CURSOR; fakeout[2].mode = GDK_MODE_SCREEN; fakeout[2].has_cursor = TRUE; fakeout[2].num_axes = 6; - fakeout[2].axes = cursorAxes; +// fakeout[2].axes = cursorAxes; fakeout[2].num_keys = 7; - fakeout[2].keys = cursorKeys; +// fakeout[2].keys = cursorKeys; fakeout[3].name = g_strdup("stylus"); fakeout[3].source = GDK_SOURCE_PEN; fakeout[3].mode = GDK_MODE_SCREEN; fakeout[3].has_cursor = TRUE; fakeout[3].num_axes = 6; - fakeout[3].axes = stylusAxes; +// fakeout[3].axes = stylusAxes; fakeout[3].num_keys = 7; - fakeout[3].keys = stylusKeys; +// fakeout[3].keys = stylusKeys; // try to find the first *real* core pointer +#if GTK_CHECK_VERSION(3,0,0) + GdkDisplay *display = gdk_display_get_default(); + GdkDeviceManager *dm = gdk_display_get_device_manager(display); + GList* devList = gdk_device_manager_list_devices(dm, GDK_DEVICE_TYPE_SLAVE); +#else GList* devList = gdk_devices_list(); +#endif + #if GTK_CHECK_VERSION (2, 22, 0) while ( devList && devList->data && (gdk_device_get_source ((GdkDevice*)devList->data) != GDK_SOURCE_MOUSE)) { #else @@ -771,15 +792,20 @@ static void createFakeList() { fakeout[4].mode = GDK_MODE_SCREEN; fakeout[4].has_cursor = TRUE; fakeout[4].num_axes = 2; - fakeout[4].axes = coreAxes; +// fakeout[4].axes = coreAxes; fakeout[4].num_keys = 0; - fakeout[4].keys = NULL; +// fakeout[4].keys = NULL; } for ( guint pos = 0; pos < G_N_ELEMENTS(fakeout); pos++) { fakeList = g_list_append(fakeList, &(fakeout[pos])); } + +#if GTK_CHECK_VERSION(3,0,0) + g_list_free(devList); +#endif } + } -- cgit v1.2.3 From 9abd33133650d77714fccf09d0c9ff27c9b75a78 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 5 Jul 2012 22:39:08 +0100 Subject: Drop GTK+ 2.20 support. Fixed bugs: - https://launchpad.net/bugs/1020494 (bzr r11529) --- src/device-manager.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'src/device-manager.cpp') diff --git a/src/device-manager.cpp b/src/device-manager.cpp index 458954580..fedcb232b 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -41,17 +41,10 @@ static bool isValidDevice(GdkDevice *device) bool valid = true; for (size_t i = 0; (i < G_N_ELEMENTS(fakeout)) && valid; i++) { // Ideally, we should probably check all fields of the GdkDevice -#if GTK_CHECK_VERSION (2, 22, 0) gboolean name_matches = (g_strcmp0 (gdk_device_get_name (device), fakeout[i].name) == 0); gboolean source_matches = (gdk_device_get_source (device) == fakeout[i].source); gboolean mode_matches = (gdk_device_get_mode (device) == fakeout[i].mode); gboolean num_axes_matches = (gdk_device_get_n_axes (device) == fakeout[i].num_axes); -#else - gboolean name_matches = (g_strcmp0 (device->name, fakeout[i].name) == 0); - gboolean source_matches = (device->source == fakeout[i].source); - gboolean mode_matches = (device->mode == fakeout[i].mode); - gboolean num_axes_matches = (device->num_axes == fakeout[i].num_axes); -#endif #if GTK_CHECK_VERSION (2, 24, 0) gboolean num_keys_matches = (gdk_device_get_n_keys (device) == fakeout[i].num_keys); @@ -178,16 +171,9 @@ public: virtual Glib::ustring getId() const {return id;} virtual Glib::ustring getName() const {return name;} virtual Gdk::InputSource getSource() const {return source;} - -#if GTK_CHECK_VERSION (2, 22, 0) virtual Gdk::InputMode getMode() const {return static_cast(gdk_device_get_mode (device));} virtual gint getNumAxes() const {return gdk_device_get_n_axes (device);} virtual bool hasCursor() const {return gdk_device_get_has_cursor (device);} -#else - virtual Gdk::InputMode getMode() const {return static_cast(device->mode);} - virtual gint getNumAxes() const {return device->num_axes;} - virtual bool hasCursor() const {return device->has_cursor;} -#endif virtual gint getNumKeys() const { // Backward-compatibility: The GSEAL-compliant @@ -246,13 +232,8 @@ InputDeviceImpl::InputDeviceImpl(GdkDevice* device, std::set &kno : InputDevice(), device(device), id(), -#if GTK_CHECK_VERSION (2, 22, 0) name(gdk_device_get_name (device) ? gdk_device_get_name (device) : ""), source(static_cast(gdk_device_get_source (device))), -#else - name(device->name ? device->name : ""), - source(static_cast(device->source)), -#endif link(), liveAxes(0), liveButtons(0) @@ -444,11 +425,7 @@ void DeviceManagerImpl::saveConfig() tmp += ";"; } GdkDevice *device = (*it)->getDevice(); -#if GTK_CHECK_VERSION (2, 22, 0) tmp += getAxisToString()[static_cast(gdk_device_get_axis_use (device, i))]; -#else - tmp += getAxisToString()[static_cast(device->axes[i].use)]; -#endif } prefs->setString( path + "/axes", tmp ); @@ -458,14 +435,10 @@ void DeviceManagerImpl::saveConfig() tmp += ";"; } GdkDevice *device = (*it)->getDevice(); -#if GTK_CHECK_VERSION (2, 22, 0) guint keyval; GdkModifierType modifiers; gdk_device_get_key (device, i, &keyval, &modifiers); tmp += gtk_accelerator_name(keyval, modifiers); -#else - tmp += gtk_accelerator_name(device->keys[i].keyval, device->keys[i].modifiers); -#endif } prefs->setString( path + "/keys", tmp ); } @@ -504,11 +477,7 @@ void DeviceManagerImpl::setAxisUse( Glib::ustring const & id, guint index, Gdk:: if (static_cast(index) <= (*it)->getNumAxes()) { GdkDevice *device = (*it)->getDevice(); -#if GTK_CHECK_VERSION (2, 22, 0) if (gdk_device_get_axis_use (device, index) != static_cast(use)) { -#else - if (device->axes[index].use != static_cast(use)) { -#endif gdk_device_set_axis_use(device, index, static_cast(use)); signalDeviceChangedPriv.emit(*it); } @@ -757,30 +726,18 @@ static void createFakeList() { GList* devList = gdk_devices_list(); #endif -#if GTK_CHECK_VERSION (2, 22, 0) while ( devList && devList->data && (gdk_device_get_source ((GdkDevice*)devList->data) != GDK_SOURCE_MOUSE)) { -#else - while ( devList && devList->data && (((GdkDevice*)devList->data)->source != GDK_SOURCE_MOUSE)) { -#endif devList = g_list_next(devList); } if ( devList && devList->data ) { //fakeout[4] = *((GdkDevice*)devList->data); // We should probably copy the axes and keys too GdkDevice *device = (GdkDevice*)devList->data; -#if GTK_CHECK_VERSION (2, 22, 0) fakeout[4].name = g_strdup(gdk_device_get_name (device)); fakeout[4].source = gdk_device_get_source (device); fakeout[4].mode = gdk_device_get_mode (device); fakeout[4].has_cursor = gdk_device_get_has_cursor (device); fakeout[4].num_axes = gdk_device_get_n_axes (device); -#else - fakeout[4].name = g_strdup(device->name); - fakeout[4].source = device->source; - fakeout[4].mode = device->mode; - fakeout[4].has_cursor = device->has_cursor; - fakeout[4].num_axes = device->num_axes; -#endif #if GTK_CHECK_VERSION (2, 24, 0) fakeout[4].num_keys = gdk_device_get_n_keys (device); #else -- cgit v1.2.3 From 1045ef77f45fcc3da502b1512b4182d1f8391962 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 24 Jul 2012 13:07:06 +0100 Subject: Don't include keyboards in input-device list. Remove comments about private fields. Fixed bugs: - https://launchpad.net/bugs/1028088 (bzr r11571) --- src/device-manager.cpp | 90 +++++++++++--------------------------------------- 1 file changed, 20 insertions(+), 70 deletions(-) (limited to 'src/device-manager.cpp') diff --git a/src/device-manager.cpp b/src/device-manager.cpp index fedcb232b..059e1b52d 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -26,9 +26,7 @@ struct GdkDeviceFake { GdkInputMode mode; gboolean has_cursor; gint num_axes; -// GdkDeviceAxis *axes; gint num_keys; -// GdkDeviceKey *keys; }; @@ -40,7 +38,6 @@ static bool isValidDevice(GdkDevice *device) { bool valid = true; for (size_t i = 0; (i < G_N_ELEMENTS(fakeout)) && valid; i++) { - // Ideally, we should probably check all fields of the GdkDevice gboolean name_matches = (g_strcmp0 (gdk_device_get_name (device), fakeout[i].name) == 0); gboolean source_matches = (gdk_device_get_source (device) == fakeout[i].source); gboolean mode_matches = (gdk_device_get_mode (device) == fakeout[i].mode); @@ -344,15 +341,26 @@ DeviceManagerImpl::DeviceManagerImpl() : for ( GList* curr = devList; curr; curr = g_list_next(curr) ) { GdkDevice* dev = reinterpret_cast(curr->data); - if ( dev ) { + if (dev) { + +#if GTK_CHECK_VERSION(3,0,0) + // GTK+ 3 has added keyboards to the list of supported devices. + if(gdk_device_get_source(dev) != GDK_SOURCE_KEYBOARD) { +#endif + #if DEBUG_VERBOSE - g_message("device: name[%s] source[0x%x] mode[0x%x] cursor[%s] axis count[%d] key count[%d]", dev->name, dev->source, dev->mode, - dev->has_cursor?"Yes":"no", dev->num_axes, dev->num_keys); + g_message("device: name[%s] source[0x%x] mode[0x%x] cursor[%s] axis count[%d] key count[%d]", dev->name, dev->source, dev->mode, + dev->has_cursor?"Yes":"no", dev->num_axes, dev->num_keys); +#endif + + InputDeviceImpl* device = new InputDeviceImpl(dev, knownIDs); + device->reference(); + devices.push_back(Glib::RefPtr(device)); + +#if GTK_CHECK_VERSION(3,0,0) + } #endif - InputDeviceImpl* device = new InputDeviceImpl(dev, knownIDs); - device->reference(); - devices.push_back(Glib::RefPtr(device)); } } @@ -631,54 +639,6 @@ DeviceManager& DeviceManager::getManager() { } // namespace Inkscape - - - -/* FIXME: Device Axis and Key details are inaccessible in GTK+ 3 - * and are deprecated in GTK+ 2. Perhaps there is a way of specifying - * this in underlying API? - * -GdkDeviceAxis padAxes[] = {{GDK_AXIS_X, 0.0, 0.0}, - {GDK_AXIS_Y, 0.0, 0.0}, - {GDK_AXIS_PRESSURE, 0.0, 1.0}, - {GDK_AXIS_XTILT, -1.0, 1.0}, - {GDK_AXIS_YTILT, -1.0, 1.0}, - {GDK_AXIS_WHEEL, 0.0, 1.0}}; -GdkDeviceKey padKeys[] = {{0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, - {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}}; - -GdkDeviceAxis eraserAxes[] = {{GDK_AXIS_X, 0.0, 0.0}, - {GDK_AXIS_Y, 0.0, 0.0}, - {GDK_AXIS_PRESSURE, 0.0, 1.0}, - {GDK_AXIS_XTILT, -1.0, 1.0}, - {GDK_AXIS_YTILT, -1.0, 1.0}, - {GDK_AXIS_WHEEL, 0.0, 1.0}}; -GdkDeviceKey eraserKeys[] = {{0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, - {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}}; - -GdkDeviceAxis cursorAxes[] = {{GDK_AXIS_X, 0.0, 0.0}, - {GDK_AXIS_Y, 0.0, 0.0}, - {GDK_AXIS_PRESSURE, 0.0, 1.0}, - {GDK_AXIS_XTILT, -1.0, 1.0}, - {GDK_AXIS_YTILT, -1.0, 1.0}, - {GDK_AXIS_WHEEL, 0.0, 1.0}}; -GdkDeviceKey cursorKeys[] = {{0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, - {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}}; - -GdkDeviceAxis stylusAxes[] = {{GDK_AXIS_X, 0.0, 0.0}, - {GDK_AXIS_Y, 0.0, 0.0}, - {GDK_AXIS_PRESSURE, 0.0, 1.0}, - {GDK_AXIS_XTILT, -1.0, 1.0}, - {GDK_AXIS_YTILT, -1.0, 1.0}, - {GDK_AXIS_WHEEL, 0.0, 1.0}}; -GdkDeviceKey stylusKeys[] = {{0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, - {0, (GdkModifierType)0}, {0, (GdkModifierType)0}, {0, (GdkModifierType)0}}; - - -GdkDeviceAxis coreAxes[] = {{GDK_AXIS_X, 0.0, 0.0}, - {GDK_AXIS_Y, 0.0, 0.0}}; -*/ - static void createFakeList() { if ( !fakeList ) { fakeout[0].name = g_strdup("pad"); @@ -686,38 +646,30 @@ static void createFakeList() { fakeout[0].mode = GDK_MODE_SCREEN; fakeout[0].has_cursor = TRUE; fakeout[0].num_axes = 6; -// fakeout[0].axes = padAxes; fakeout[0].num_keys = 8; -// fakeout[0].keys = padKeys; fakeout[1].name = g_strdup("eraser"); fakeout[1].source = GDK_SOURCE_ERASER; fakeout[1].mode = GDK_MODE_SCREEN; fakeout[1].has_cursor = TRUE; fakeout[1].num_axes = 6; -// fakeout[1].axes = eraserAxes; fakeout[1].num_keys = 7; -// fakeout[1].keys = eraserKeys; fakeout[2].name = g_strdup("cursor"); fakeout[2].source = GDK_SOURCE_CURSOR; fakeout[2].mode = GDK_MODE_SCREEN; fakeout[2].has_cursor = TRUE; fakeout[2].num_axes = 6; -// fakeout[2].axes = cursorAxes; fakeout[2].num_keys = 7; -// fakeout[2].keys = cursorKeys; fakeout[3].name = g_strdup("stylus"); fakeout[3].source = GDK_SOURCE_PEN; fakeout[3].mode = GDK_MODE_SCREEN; fakeout[3].has_cursor = TRUE; fakeout[3].num_axes = 6; -// fakeout[3].axes = stylusAxes; fakeout[3].num_keys = 7; -// fakeout[3].keys = stylusKeys; -// try to find the first *real* core pointer + // try to find the first *real* core pointer #if GTK_CHECK_VERSION(3,0,0) GdkDisplay *display = gdk_display_get_default(); GdkDeviceManager *dm = gdk_display_get_device_manager(display); @@ -726,12 +678,12 @@ static void createFakeList() { GList* devList = gdk_devices_list(); #endif + // Skip past any items in the device list that are not mice while ( devList && devList->data && (gdk_device_get_source ((GdkDevice*)devList->data) != GDK_SOURCE_MOUSE)) { devList = g_list_next(devList); } + if ( devList && devList->data ) { - //fakeout[4] = *((GdkDevice*)devList->data); - // We should probably copy the axes and keys too GdkDevice *device = (GdkDevice*)devList->data; fakeout[4].name = g_strdup(gdk_device_get_name (device)); fakeout[4].source = gdk_device_get_source (device); @@ -749,9 +701,7 @@ static void createFakeList() { fakeout[4].mode = GDK_MODE_SCREEN; fakeout[4].has_cursor = TRUE; fakeout[4].num_axes = 2; -// fakeout[4].axes = coreAxes; fakeout[4].num_keys = 0; -// fakeout[4].keys = NULL; } for ( guint pos = 0; pos < G_N_ELEMENTS(fakeout); pos++) { -- cgit v1.2.3 From 370a3f5cc9e39352a081e5d5dd8c43676547a6e6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Oct 2012 11:45:44 +1000 Subject: code cleanup: add own includes to cpp files or make the functions static if they are not used elsewhere. (bzr r11735) --- src/device-manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/device-manager.cpp') diff --git a/src/device-manager.cpp b/src/device-manager.cpp index 059e1b52d..5c7048613 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -113,7 +113,7 @@ static std::map &getStringToAxis() return mapping; } -std::map &getAxisToString() +static std::map &getAxisToString() { static bool init = false; static std::map mapping; @@ -139,7 +139,7 @@ static std::map &getStringToMode() return mapping; } -std::map &getModeToString() +static std::map &getModeToString() { static bool init = false; static std::map mapping; -- cgit v1.2.3 From 4af19c56cf90e31a0d800821e8daf7fb08108e94 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 26 Nov 2012 10:33:19 +0000 Subject: Drop support for GTK+ < 2.24 Fixed bugs: - https://launchpad.net/bugs/1069024 (bzr r11907) --- src/device-manager.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/device-manager.cpp') diff --git a/src/device-manager.cpp b/src/device-manager.cpp index 5c7048613..29efa2627 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -173,14 +173,7 @@ public: virtual bool hasCursor() const {return gdk_device_get_has_cursor (device);} virtual gint getNumKeys() const { -// Backward-compatibility: The GSEAL-compliant -// gdk_device_get_n_keys function was only introduced -// with GTK 2.24 -#if GTK_CHECK_VERSION(2, 24, 0) - return gdk_device_get_n_keys (device); -#else - return device->num_keys; -#endif // GTK_CHECK_VERSION + return gdk_device_get_n_keys (device); } virtual Glib::ustring getLink() const {return link;} virtual void setLink( Glib::ustring const& link ) {this->link = link;} -- cgit v1.2.3 From f3ebae385211512a9cbd727b5aa532f6aa1b711b Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Fri, 4 Jan 2013 09:35:53 +0000 Subject: ocaldialog: Use GtkSearchEntry in Gtk+ >= 3.6 (bzr r12008) --- src/device-manager.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/device-manager.cpp') diff --git a/src/device-manager.cpp b/src/device-manager.cpp index 29efa2627..a9394a5f6 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -42,12 +42,7 @@ static bool isValidDevice(GdkDevice *device) gboolean source_matches = (gdk_device_get_source (device) == fakeout[i].source); gboolean mode_matches = (gdk_device_get_mode (device) == fakeout[i].mode); gboolean num_axes_matches = (gdk_device_get_n_axes (device) == fakeout[i].num_axes); - -#if GTK_CHECK_VERSION (2, 24, 0) gboolean num_keys_matches = (gdk_device_get_n_keys (device) == fakeout[i].num_keys); -#else - gboolean num_keys_matches = (device->num_keys == fakeout[i].num_keys); -#endif if (name_matches && source_matches && mode_matches && num_axes_matches && num_keys_matches) @@ -683,11 +678,7 @@ static void createFakeList() { fakeout[4].mode = gdk_device_get_mode (device); fakeout[4].has_cursor = gdk_device_get_has_cursor (device); fakeout[4].num_axes = gdk_device_get_n_axes (device); -#if GTK_CHECK_VERSION (2, 24, 0) fakeout[4].num_keys = gdk_device_get_n_keys (device); -#else - fakeout[4].num_keys = device->num_keys; -#endif } else { fakeout[4].name = g_strdup("Core Pointer"); fakeout[4].source = GDK_SOURCE_MOUSE; -- cgit v1.2.3 From ea952687e7b1ae64c4c30c8eb66bd875d75fec2d Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 23 Feb 2013 13:57:26 +0000 Subject: Fix missing headers for Gtk+ 3 build Fixed bugs: - https://launchpad.net/bugs/1122816 (bzr r12145) --- src/device-manager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/device-manager.cpp') diff --git a/src/device-manager.cpp b/src/device-manager.cpp index a9394a5f6..a07231805 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -14,6 +14,7 @@ #include "device-manager.h" #include "preferences.h" #include +#include #define noDEBUG_VERBOSE 1 -- cgit v1.2.3 From 0cdd007ebf8dcfbd39c1d36ab53f43617eb692df Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 25 Mar 2013 17:42:31 +0000 Subject: Workaround usage of deprecated glib symbols in 3rd party libraries Fixed bugs: - https://launchpad.net/bugs/1122774 (bzr r12243) --- src/device-manager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/device-manager.cpp') diff --git a/src/device-manager.cpp b/src/device-manager.cpp index a07231805..610173d3d 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -7,11 +7,10 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include +#include "device-manager.h" #include #include -#include "device-manager.h" #include "preferences.h" #include #include -- cgit v1.2.3