From da746d5169a9ee4c3caa3e372e897a6c5d459740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 9 Jun 2011 17:10:47 +0200 Subject: [PATCH] win32: fix gdk clipboard https://bugzilla.gnome.org/show_bug.cgi?id=648931 --- gdk/gdk.symbols | 2 ++ gtk/gtkselection.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols index 39e4a85188..58f3401315 100644 --- a/gdk/gdk.symbols +++ b/gdk/gdk.symbols @@ -1239,6 +1239,8 @@ gdk_window_destroy_notify gdk_win32_window_is_win32 gdk_win32_begin_direct_draw_libgtk_only gdk_win32_end_direct_draw_libgtk_only +gdk_win32_window_lookup_for_display +gdk_win32_window_foreign_new_for_display #endif #endif diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 3d45c07bd1..c2c9d9799a 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -1328,6 +1328,11 @@ selection_set_compound_text (GtkSelectionData *selection_data, result = TRUE; } g_free (tmp); +#elif defined GDK_WINDOWING_WIN32 + result = FALSE; /* not needed on Win32 */ +#else + g_warning ("%s is not implemented", G_STRFUNC); + result = FALSE; #endif return result; @@ -2280,7 +2285,12 @@ _gtk_selection_request (GtkWidget *widget, /* Create GdkWindow structure for the requestor */ #ifdef GDK_WINDOWING_X11 info->requestor = gdk_x11_window_foreign_new_for_display (display, event->requestor); +#elif defined GDK_WINDOWING_WIN32 + info->requestor = gdk_win32_window_lookup_for_display (display, event->requestor); + if (!info->requestor) + info->requestor = gdk_win32_window_foreign_new_for_display (display, event->requestor); #else + g_warning ("%s is not implemented", G_STRFUNC); info->requestor = NULL; #endif