+2005-09-20 Tor Lillqvist <tml@novell.com>
+
+ * gdk/win32/gdkselection-win32.c
+ (gdk_selection_owner_get_for_display): Do return the correct owner
+ for CLIPBOARD (i.e., the owner of the Windows Clipboard, if it is
+ a window GDK knows about). The reason to return NULL seems to have
+ gone when in the fix for bug #163702 the artificial
+ GDK_SELECTION_CLEAR event generation was removed from
+ gdk_selection_send_notify_for_display(). Fixes bug #316552.
+
2005-09-20 Matthias Clasen <mclasen@redhat.com>
Avoid unnecessary XkbGetState() calls and XkbStateNotify
+2005-09-20 Tor Lillqvist <tml@novell.com>
+
+ * gdk/win32/gdkselection-win32.c
+ (gdk_selection_owner_get_for_display): Do return the correct owner
+ for CLIPBOARD (i.e., the owner of the Windows Clipboard, if it is
+ a window GDK knows about). The reason to return NULL seems to have
+ gone when in the fix for bug #163702 the artificial
+ GDK_SELECTION_CLEAR event generation was removed from
+ gdk_selection_send_notify_for_display(). Fixes bug #316552.
+
2005-09-20 Matthias Clasen <mclasen@redhat.com>
Avoid unnecessary XkbGetState() calls and XkbStateNotify
g_return_val_if_fail (display == _gdk_display, NULL);
g_return_val_if_fail (selection != GDK_NONE, NULL);
- /* Return NULL for CLIPBOARD, because otherwise cut&paste inside the
- * same application doesn't work. We must pretend to gtk that we
- * don't have the selection, so that we always fetch it from the
- * Windows clipboard. See also comments in
- * gdk_selection_send_notify().
- */
if (selection == GDK_SELECTION_CLIPBOARD)
- return NULL;
+ {
+ HWND owner = GetClipboardOwner ();
+
+ if (owner == NULL)
+ return NULL;
+
+ return gdk_win32_handle_table_lookup ((GdkNativeWindow) owner);
+ }
window = gdk_window_lookup ((GdkNativeWindow) g_hash_table_lookup (sel_owner_table, selection));
GdkAtom property,
guint32 time)
{
+#ifdef G_ENABLE_DEBUG
gchar *sel_name, *tgt_name, *prop_name;
+#endif
g_return_if_fail (display == _gdk_display);
(sel_name = gdk_atom_name (selection),
tgt_name = gdk_atom_name (target),
prop_name = gdk_atom_name (property),
- g_print ("gdk_selection_send_notify: %#x %#x (%s) %#x (%s) %#x (%s)\n",
+ g_print ("gdk_selection_send_notify_for_display: %#x %#x (%s) %#x (%s) %#x (%s)\n",
requestor,
(guint) selection, sel_name,
(guint) target, tgt_name,