diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-05-27 15:49:56 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-05-27 15:49:56 +0000 |
| commit | 1bc7c3b2bc3979c47a1127716f4a6d51034c1637 (patch) | |
| tree | 7a6f707d9c5cdb232078451ddd2975af0b0e9da6 /src/desktop-events.cpp | |
| parent | Stop using obsolete GdkDevice API. Needs testing with extended input devices (diff) | |
| download | inkscape-1bc7c3b2bc3979c47a1127716f4a6d51034c1637.tar.gz inkscape-1bc7c3b2bc3979c47a1127716f4a6d51034c1637.zip | |
Get rid of remaining deprecated GdkDevice API usage
(bzr r11426)
Diffstat (limited to 'src/desktop-events.cpp')
| -rw-r--r-- | src/desktop-events.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index 74450adb6..7a0c144ce 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -546,7 +546,15 @@ static GdkInputSource lastType = GDK_SOURCE_MOUSE; static void init_extended() { std::string avoidName = "pad"; + +#if GTK_CHECK_VERSION(3,0,0) + GdkDisplay *display = gdk_display_get_default(); + GdkDeviceManager *dm = gdk_display_get_device_manager(display); + GList* devices = gdk_device_manager_list_devices(dm, GDK_DEVICE_TYPE_SLAVE); +#else GList* devices = gdk_devices_list(); +#endif + if ( devices ) { for ( GList* curr = devices; curr; curr = g_list_next(curr) ) { GdkDevice* dev = reinterpret_cast<GdkDevice*>(curr->data); @@ -581,6 +589,10 @@ static void init_extended() } } } + +#if GTK_CHECK_VERSION(3,0,0) + g_list_free(devices); +#endif } |
