[gtk+/wip/baedert/gtk-widget-destroy: 3/10] clipboard: Make sure we got a selection
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gtk-widget-destroy: 3/10] clipboard: Make sure we got a selection
- Date: Tue, 26 Sep 2017 13:08:28 +0000 (UTC)
commit 6b305af1f9e86ff616d2e23f723d70dd6c45747f
Author: Timm Bäder <mail baedert org>
Date: Tue Sep 26 09:57:03 2017 +0200
clipboard: Make sure we got a selection
gdk_event_selection does not always fill the passed GdkAtom.
gtk/gtkclipboard.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c
index 329299e..417823c 100644
--- a/gtk/gtkclipboard.c
+++ b/gtk/gtkclipboard.c
@@ -2025,7 +2025,9 @@ _gtk_clipboard_handle_event (GdkEventOwnerChange *event)
GdkAtom selection;
GtkClipboard *clipboard;
- gdk_event_get_selection ((GdkEvent *)event, &selection);
+ if (!gdk_event_get_selection ((GdkEvent *)event, &selection))
+ return;
+
display = gdk_window_get_display (gdk_event_get_window ((GdkEvent *)event));
clipboard = clipboard_peek (display, selection, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]