summaryrefslogtreecommitdiff
path: root/gtk/gtkselection.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-12-15 01:39:30 -0500
committerMatthias Clasen <mclasen@redhat.com>2010-12-21 12:06:59 -0500
commit2d7583c0e32168a89168a1fbc40155122db1bfe9 (patch)
tree9ac82c91881a44de2b2a72046f452781bf86588f /gtk/gtkselection.c
parent39a71b8831988f29da763ccc71f2a45e01a212ae (diff)
downloadgtk+-2d7583c0e32168a89168a1fbc40155122db1bfe9.tar.gz
Make gdk_window_{lookup,foreign_new}_for_display backend specific
At the same time, make GDK_IS_DISPLAY_X11 available in gdkx.h, and add some exemplaric ifdefs to GTK+ code.
Diffstat (limited to 'gtk/gtkselection.c')
-rw-r--r--gtk/gtkselection.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 71520e448e..043d8ed71d 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -2266,20 +2266,20 @@ _gtk_selection_request (GtkWidget *widget,
info = g_slice_new (GtkIncrInfo);
g_object_ref (widget);
-
+
info->selection = event->selection;
info->num_incrs = 0;
-
+
/* Create GdkWindow structure for the requestor */
-
- info->requestor = gdk_window_lookup_for_display (display,
- event->requestor);
- if (!info->requestor)
- info->requestor = gdk_window_foreign_new_for_display (display,
- event->requestor);
-
+
+#ifdef GDK_WINDOWING_X11
+ if (GDK_IS_DISPLAY_X11 (display))
+ info->requestor = gdk_x11_window_foreign_new_for_display (display, event->requestor);
+ else
+#endif
+ info->requestor = NULL;
+
/* Determine conversions we need to perform */
-
if (event->target == gtk_selection_atoms[MULTIPLE])
{
GdkAtom type;