[gtk+/quartz-integration] Force a pasteboard changeOwner notification when a widget with an active selection is deleted.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/quartz-integration] Force a pasteboard changeOwner notification when a widget with an active selection is deleted.
- Date: Sat, 1 Jan 2011 07:28:32 +0000 (UTC)
commit 9493ce2ab215fb2f0a8dd637c95e29e6e9fd184a
Author: John Ralls <jralls ceridwen us>
Date: Fri Dec 31 17:12:31 2010 -0800
Force a pasteboard changeOwner notification when a widget with an active selection is deleted.
gtk/gtkselection-quartz.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkselection-quartz.c b/gtk/gtkselection-quartz.c
index f7b4654..6f97693 100644
--- a/gtk/gtkselection-quartz.c
+++ b/gtk/gtkselection-quartz.c
@@ -562,6 +562,12 @@ gtk_selection_info_remove (GdkAtom selection, GtkWidget *owner)
if (selection_info->selection == selection &&
selection_info->owner == owner)
{
+ /* Clear the clipboard; this will send a changedOwner to the
+ pasteboard so that it won't try to retrieve the
+ still-pending types later when the window isn't around to
+ provide them. */
+ GtkClipboard *clip = gtk_clipboard_get(selection_info->selection);
+ gtk_clipboard_clear(clip);
current_selections = g_list_remove_link (current_selections,
tmp_list);
g_list_free (tmp_list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]