diff options
author | Benjamin Otte <otte@redhat.com> | 2017-11-14 03:56:35 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-11-15 19:07:16 +0100 |
commit | fb94f79094745a0e3fc64d5d56cea1637a8fdb73 (patch) | |
tree | 14c4dd210b12b86d8a482556da113fd073081c3c | |
parent | 13ca03efb165dd5e3ca82984bcd845deb1924cab (diff) | |
download | gtk+-fb94f79094745a0e3fc64d5d56cea1637a8fdb73.tar.gz |
selection: Remove #ifdef WAYLAND
Instead, turn the functions into backend API:
gdk_broadway_display_add_selection_targets()
gdk_broadway_display_clear_selection_targets()
Remove the old per-backend functions, too.
-rw-r--r-- | gdk/broadway/gdkdisplay-broadway.c | 2 | ||||
-rw-r--r-- | gdk/broadway/gdkprivate-broadway.h | 7 | ||||
-rw-r--r-- | gdk/broadway/gdkselection-broadway.c | 15 | ||||
-rw-r--r-- | gdk/gdkdisplayprivate.h | 7 | ||||
-rw-r--r-- | gdk/gdkselection.c | 21 | ||||
-rw-r--r-- | gdk/gdkselection.h | 10 | ||||
-rw-r--r-- | gdk/quartz/gdkdisplay-quartz.c | 2 | ||||
-rw-r--r-- | gdk/wayland/gdkdisplay-wayland.c | 2 | ||||
-rw-r--r-- | gdk/wayland/gdkprivate-wayland.h | 7 | ||||
-rw-r--r-- | gdk/wayland/gdkselection-wayland.c | 16 | ||||
-rw-r--r-- | gdk/wayland/gdkwayland.h | 1 | ||||
-rw-r--r-- | gdk/wayland/gdkwaylandselection.h | 54 | ||||
-rw-r--r-- | gdk/wayland/meson.build | 1 | ||||
-rw-r--r-- | gdk/win32/gdkdisplay-win32.c | 2 | ||||
-rw-r--r-- | gdk/win32/gdkprivate-win32.h | 7 | ||||
-rw-r--r-- | gdk/win32/gdkselection-win32.c | 15 | ||||
-rw-r--r-- | gdk/win32/gdkwin32misc.h | 6 | ||||
-rw-r--r-- | gdk/x11/gdkdisplay-x11.c | 2 | ||||
-rw-r--r-- | gdk/x11/gdkprivate-x11.h | 7 | ||||
-rw-r--r-- | gdk/x11/gdkselection-x11.c | 15 | ||||
-rw-r--r-- | gtk/gtkselection.c | 43 |
21 files changed, 133 insertions, 109 deletions
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c index bac7a979bc..2b69bc8270 100644 --- a/gdk/broadway/gdkdisplay-broadway.c +++ b/gdk/broadway/gdkdisplay-broadway.c @@ -357,6 +357,8 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class) display_class->set_selection_owner = _gdk_broadway_display_set_selection_owner; display_class->send_selection_notify = _gdk_broadway_display_send_selection_notify; display_class->get_selection_property = _gdk_broadway_display_get_selection_property; + display_class->clear_selection_targets = gdk_broadway_display_clear_selection_targets; + display_class->add_selection_targets = gdk_broadway_display_add_selection_targets; display_class->convert_selection = _gdk_broadway_display_convert_selection; display_class->text_property_to_utf8_list = _gdk_broadway_display_text_property_to_utf8_list; display_class->utf8_to_string_target = _gdk_broadway_display_utf8_to_string_target; diff --git a/gdk/broadway/gdkprivate-broadway.h b/gdk/broadway/gdkprivate-broadway.h index 4b1ee656ad..8a82d472f4 100644 --- a/gdk/broadway/gdkprivate-broadway.h +++ b/gdk/broadway/gdkprivate-broadway.h @@ -130,6 +130,13 @@ gint _gdk_broadway_display_get_selection_property (GdkDisplay *display, guchar **data, GdkAtom *ret_type, gint *ret_format); +void gdk_broadway_display_clear_selection_targets (GdkDisplay *display, + GdkAtom selection); +void gdk_broadway_display_add_selection_targets (GdkDisplay *display, + GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint ntargets); void _gdk_broadway_display_send_selection_notify (GdkDisplay *display, GdkWindow *requestor, GdkAtom selection, diff --git a/gdk/broadway/gdkselection-broadway.c b/gdk/broadway/gdkselection-broadway.c index b62e11ef16..1f3813bc23 100644 --- a/gdk/broadway/gdkselection-broadway.c +++ b/gdk/broadway/gdkselection-broadway.c @@ -159,6 +159,21 @@ _gdk_broadway_display_get_selection_property (GdkDisplay *display, } void +gdk_broadway_display_clear_selection_targets (GdkDisplay *display, + GdkAtom selection) +{ +} + +void +gdk_broadway_display_add_selection_targets (GdkDisplay *display, + GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint ntargets) +{ +} + +void _gdk_broadway_display_send_selection_notify (GdkDisplay *display, GdkWindow *requestor, GdkAtom selection, diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h index 493f730655..96f2814041 100644 --- a/gdk/gdkdisplayprivate.h +++ b/gdk/gdkdisplayprivate.h @@ -186,6 +186,13 @@ struct _GdkDisplayClass guchar **data, GdkAtom *type, gint *format); + void (*clear_selection_targets)(GdkDisplay *display, + GdkAtom selection); + void (*add_selection_targets) (GdkDisplay *display, + GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint ntargets); void (*convert_selection) (GdkDisplay *display, GdkWindow *requestor, GdkAtom selection, diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c index 302a76a2bd..9eb60f57f8 100644 --- a/gdk/gdkselection.c +++ b/gdk/gdkselection.c @@ -329,3 +329,24 @@ gdk_utf8_to_string_target (const gchar *str) return GDK_DISPLAY_GET_CLASS (display)->utf8_to_string_target (display, str); } + +void +gdk_selection_clear_targets (GdkDisplay *display, + GdkAtom selection) +{ +} + +void +gdk_selection_add_targets (GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint n_targets) +{ + GdkDisplay *display; + + g_return_if_fail (GDK_IS_WINDOW (window)); + + display = gdk_window_get_display (window); + + GDK_DISPLAY_GET_CLASS (display)->add_selection_targets (display, window, selection, targets, n_targets); +} diff --git a/gdk/gdkselection.h b/gdk/gdkselection.h index 396982508b..54858f5f17 100644 --- a/gdk/gdkselection.h +++ b/gdk/gdkselection.h @@ -209,6 +209,16 @@ void gdk_selection_send_notify_for_display (GdkDisplay *display, GdkAtom property, guint32 time_); +GDK_AVAILABLE_IN_3_94 +void gdk_selection_clear_targets (GdkDisplay *display, + GdkAtom selection); + +GDK_AVAILABLE_IN_3_94 +void gdk_selection_add_targets (GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint n_targets); + G_END_DECLS #endif /* __GDK_SELECTION_H__ */ diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c index 07d55b8b9c..206a84afaf 100644 --- a/gdk/quartz/gdkdisplay-quartz.c +++ b/gdk/quartz/gdkdisplay-quartz.c @@ -280,6 +280,8 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class) display_class->get_selection_owner = _gdk_quartz_display_get_selection_owner; display_class->set_selection_owner = _gdk_quartz_display_set_selection_owner; display_class->get_selection_property = _gdk_quartz_display_get_selection_property; + display_class->clear_selection_targets = gdk_quartz_display_clear_selection_targets; + display_class->add_selection_targets = gdk_quartz_display_add_selection_targets; display_class->convert_selection = _gdk_quartz_display_convert_selection; display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list; display_class->utf8_to_string_target = _gdk_quartz_display_utf8_to_string_target; diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index f74dd2ad79..d8dc8cb305 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1043,6 +1043,8 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class) display_class->set_selection_owner = _gdk_wayland_display_set_selection_owner; display_class->send_selection_notify = _gdk_wayland_display_send_selection_notify; display_class->get_selection_property = _gdk_wayland_display_get_selection_property; + display_class->clear_selection_targets = gdk_wayland_display_clear_selection_targets; + display_class->add_selection_targets = gdk_wayland_display_add_selection_targets; display_class->convert_selection = _gdk_wayland_display_convert_selection; display_class->text_property_to_utf8_list = _gdk_wayland_display_text_property_to_utf8_list; display_class->utf8_to_string_target = _gdk_wayland_display_utf8_to_string_target; diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h index 64ea4e0d9e..055597eb5c 100644 --- a/gdk/wayland/gdkprivate-wayland.h +++ b/gdk/wayland/gdkprivate-wayland.h @@ -149,6 +149,13 @@ gint _gdk_wayland_display_get_selection_property (GdkDisplay *display, guchar **data, GdkAtom *ret_type, gint *ret_format); +void gdk_wayland_display_clear_selection_targets (GdkDisplay *display, + GdkAtom selection); +void gdk_wayland_display_add_selection_targets (GdkDisplay *display, + GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint ntargets); void _gdk_wayland_display_convert_selection (GdkDisplay *display, GdkWindow *requestor, GdkAtom selection, diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c index b98caa8ddf..b60a99ab1f 100644 --- a/gdk/wayland/gdkselection-wayland.c +++ b/gdk/wayland/gdkselection-wayland.c @@ -966,7 +966,7 @@ data_source_dnd_finished (void *data, g_signal_emit_by_name (context, "dnd-finished"); gdk_selection_owner_set (NULL, atoms[ATOM_DND], GDK_CURRENT_TIME, TRUE); - gdk_wayland_selection_clear_targets (display, atoms[ATOM_DND]); + gdk_wayland_display_clear_selection_targets (display, atoms[ATOM_DND]); } static void @@ -1486,12 +1486,12 @@ _gdk_wayland_display_utf8_to_string_target (GdkDisplay *display, } void -gdk_wayland_selection_add_targets (GdkWindow *window, - GdkAtom selection, - guint ntargets, - GdkAtom *targets) +gdk_wayland_display_add_selection_targets (GdkDisplay *display, + GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint ntargets) { - GdkDisplay *display = gdk_window_get_display (window); GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display); gpointer data_source; guint i; @@ -1532,8 +1532,8 @@ gdk_wayland_selection_add_targets (GdkWindow *window, } void -gdk_wayland_selection_clear_targets (GdkDisplay *display, - GdkAtom selection) +gdk_wayland_display_clear_selection_targets (GdkDisplay *display, + GdkAtom selection) { GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display); diff --git a/gdk/wayland/gdkwayland.h b/gdk/wayland/gdkwayland.h index 2b79295add..14f25d1d1d 100644 --- a/gdk/wayland/gdkwayland.h +++ b/gdk/wayland/gdkwayland.h @@ -32,7 +32,6 @@ #include <gdk/wayland/gdkwaylanddevice.h> #include <gdk/wayland/gdkwaylanddisplay.h> #include <gdk/wayland/gdkwaylandmonitor.h> -#include <gdk/wayland/gdkwaylandselection.h> #include <gdk/wayland/gdkwaylandwindow.h> #include <gdk/wayland/gdkwaylandglcontext.h> diff --git a/gdk/wayland/gdkwaylandselection.h b/gdk/wayland/gdkwaylandselection.h deleted file mode 100644 index f3b0f50b65..0000000000 --- a/gdk/wayland/gdkwaylandselection.h +++ /dev/null @@ -1,54 +0,0 @@ -/* GDK - The GIMP Drawing Kit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -/* - * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __GDK_WAYLAND_SELECTION_H__ -#define __GDK_WAYLAND_SELECTION_H__ - -#if !defined (__GDKWAYLAND_H_INSIDE__) && !defined (GDK_COMPILATION) -#error "Only <gdk/gdkwayland.h> can be included directly." -#endif - -#include <gdk/gdk.h> - -G_BEGIN_DECLS - -#if defined (GTK_COMPILATION) || defined (GDK_COMPILATION) -#define gdk_wayland_selection_add_targets gdk_wayland_selection_add_targets_libgtk_only -GDK_AVAILABLE_IN_ALL -void -gdk_wayland_selection_add_targets (GdkWindow *window, - GdkAtom selection, - guint ntargets, - GdkAtom *targets); - -#define gdk_wayland_selection_clear_targets gdk_wayland_selection_clear_targets_libgtk_only -GDK_AVAILABLE_IN_ALL -void -gdk_wayland_selection_clear_targets (GdkDisplay *display, GdkAtom selection); - -#endif - -G_END_DECLS - -#endif /* __GDK_WAYLAND_SELECTION_H__ */ diff --git a/gdk/wayland/meson.build b/gdk/wayland/meson.build index 0914301ad2..434d290e76 100644 --- a/gdk/wayland/meson.build +++ b/gdk/wayland/meson.build @@ -19,7 +19,6 @@ gdk_wayland_public_headers = files([ 'gdkwaylanddisplay.h', 'gdkwaylandglcontext.h', 'gdkwaylandmonitor.h', - 'gdkwaylandselection.h', 'gdkwaylandwindow.h' ]) diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 04b2f778b7..bdcfa667ba 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -1268,6 +1268,8 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass) display_class->set_selection_owner = _gdk_win32_display_set_selection_owner; display_class->send_selection_notify = _gdk_win32_display_send_selection_notify; display_class->get_selection_property = _gdk_win32_display_get_selection_property; + display_class->clear_selection_targets = gdk_win32_display_clear_selection_targets; + display_class->add_selection_targets = gdk_win32_display_add_selection_targets; display_class->convert_selection = _gdk_win32_display_convert_selection; display_class->text_property_to_utf8_list = _gdk_win32_display_text_property_to_utf8_list; display_class->utf8_to_string_target = _gdk_win32_display_utf8_to_string_target; diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h index cb74e6679b..fd9b67ee1d 100644 --- a/gdk/win32/gdkprivate-win32.h +++ b/gdk/win32/gdkprivate-win32.h @@ -439,6 +439,13 @@ gint _gdk_win32_display_get_selection_property (GdkDisplay *display, guchar **data, GdkAtom *ret_type, gint *ret_format); +void gdk_win32_display_clear_selection_targets (GdkDisplay *display, + GdkAtom selection); +void gdk_win32_display_add_selection_targets (GdkDisplay *display, + GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint ntargets); void _gdk_win32_display_convert_selection (GdkDisplay *display, GdkWindow *requestor, GdkAtom selection, diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c index 131c0bf436..9de722691f 100644 --- a/gdk/win32/gdkselection-win32.c +++ b/gdk/win32/gdkselection-win32.c @@ -1134,6 +1134,12 @@ gdk_free_compound_text (guchar *ctext) g_return_if_fail (ctext == NULL); } +void +gdk_win32_display_clear_selection_targets (GdkDisplay *display, + GdkAtom selection) +{ +} + /* This function is called from gtk_selection_add_target() and * gtk_selection_add_targets() in gtkselection.c. It is this function * that takes care of setting those clipboard formats for which we use @@ -1142,10 +1148,11 @@ gdk_free_compound_text (guchar *ctext) */ void -gdk_win32_selection_add_targets (GdkWindow *owner, - GdkAtom selection, - gint n_targets, - GdkAtom *targets) +gdk_win32_display_add_selection_targets (GdkDisplay *display, + GdkWindow *owner, + GdkAtom selection, + GdkAtom *targets, + guint ntargets) { HWND hwnd = NULL; gboolean has_image = FALSE; diff --git a/gdk/win32/gdkwin32misc.h b/gdk/win32/gdkwin32misc.h index dadb4e23e1..1bc11f5164 100644 --- a/gdk/win32/gdkwin32misc.h +++ b/gdk/win32/gdkwin32misc.h @@ -82,12 +82,6 @@ GDK_AVAILABLE_IN_ALL HGDIOBJ gdk_win32_window_get_handle (GdkWindow *window); GDK_AVAILABLE_IN_ALL -void gdk_win32_selection_add_targets (GdkWindow *owner, - GdkAtom selection, - gint n_targets, - GdkAtom *targets); - -GDK_AVAILABLE_IN_ALL GdkWindow * gdk_win32_window_foreign_new_for_display (GdkDisplay *display, HWND anid); GDK_AVAILABLE_IN_ALL diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 5a560d6311..c89753a851 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -3193,6 +3193,8 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class) display_class->set_selection_owner = _gdk_x11_display_set_selection_owner; display_class->send_selection_notify = _gdk_x11_display_send_selection_notify; display_class->get_selection_property = _gdk_x11_display_get_selection_property; + display_class->clear_selection_targets = gdk_x11_display_clear_selection_targets; + display_class->add_selection_targets = gdk_x11_display_add_selection_targets; display_class->convert_selection = _gdk_x11_display_convert_selection; display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list; display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target; diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h index ab43c39b2f..0cc8d36dad 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -171,6 +171,13 @@ gint _gdk_x11_display_get_selection_property (GdkDisplay *display, guchar **data, GdkAtom *ret_type, gint *ret_format); +void gdk_x11_display_clear_selection_targets (GdkDisplay *display, + GdkAtom selection); +void gdk_x11_display_add_selection_targets (GdkDisplay *display, + GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint ntargets); void _gdk_x11_display_convert_selection (GdkDisplay *display, GdkWindow *requestor, GdkAtom selection, diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c index ede48170af..fe977aef97 100644 --- a/gdk/x11/gdkselection-x11.c +++ b/gdk/x11/gdkselection-x11.c @@ -313,6 +313,21 @@ _gdk_x11_display_get_selection_property (GdkDisplay *display, } void +gdk_x11_display_clear_selection_targets (GdkDisplay *display, + GdkAtom selection) +{ +} + +void +gdk_x11_display_add_selection_targets (GdkDisplay *display, + GdkWindow *window, + GdkAtom selection, + GdkAtom *targets, + guint ntargets) +{ +} + +void _gdk_x11_display_send_selection_notify (GdkDisplay *display, GdkWindow *requestor, GdkAtom selection, diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 611c09e677..2ab9dc7b40 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -878,10 +878,7 @@ gtk_selection_clear_targets (GtkWidget *widget, g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (selection != GDK_NONE); -#ifdef GDK_WINDOWING_WAYLAND - if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget))) - gdk_wayland_selection_clear_targets (gtk_widget_get_display (widget), selection); -#endif + gdk_selection_clear_targets (gtk_widget_get_display (widget), selection); lists = g_object_get_data (G_OBJECT (widget), gtk_selection_handler_key); @@ -927,13 +924,7 @@ gtk_selection_add_target (GtkWidget *widget, list = gtk_selection_target_list_get (widget, selection); gtk_target_list_add (list, target, 0, info); -#ifdef GDK_WINDOWING_WAYLAND - if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget))) - gdk_wayland_selection_add_targets (gtk_widget_get_window (widget), selection, 1, &target); -#endif -#ifdef GDK_WINDOWING_WIN32 - gdk_win32_selection_add_targets (gtk_widget_get_window (widget), selection, 1, &target); -#endif + gdk_selection_add_targets (gtk_widget_get_window (widget), selection, &target, 1); } /** @@ -953,6 +944,8 @@ gtk_selection_add_targets (GtkWidget *widget, guint ntargets) { GtkTargetList *list; + GdkAtom *atoms = g_new (GdkAtom, ntargets); + guint i; g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (selection != GDK_NONE); @@ -961,31 +954,11 @@ gtk_selection_add_targets (GtkWidget *widget, list = gtk_selection_target_list_get (widget, selection); gtk_target_list_add_table (list, targets, ntargets); -#ifdef GDK_WINDOWING_WAYLAND - if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget))) - { - GdkAtom *atoms = g_new (GdkAtom, ntargets); - guint i; + for (i = 0; i < ntargets; i++) + atoms[i] = gdk_atom_intern (targets[i].target, FALSE); - for (i = 0; i < ntargets; i++) - atoms[i] = gdk_atom_intern (targets[i].target, FALSE); - - gdk_wayland_selection_add_targets (gtk_widget_get_window (widget), selection, ntargets, atoms); - g_free (atoms); - } -#endif - -#ifdef GDK_WINDOWING_WIN32 - { - int i; - GdkAtom *atoms = g_new (GdkAtom, ntargets); - - for (i = 0; i < ntargets; ++i) - atoms[i] = gdk_atom_intern (targets[i].target, FALSE); - gdk_win32_selection_add_targets (gtk_widget_get_window (widget), selection, ntargets, atoms); - g_free (atoms); - } -#endif + gdk_selection_add_targets (gtk_widget_get_window (widget), selection, atoms, ntargets); + g_free (atoms); } |