[gtk+/gtk-3-14] x11: Handle obsolete selection requests without crashing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] x11: Handle obsolete selection requests without crashing
- Date: Thu, 27 Nov 2014 03:30:11 +0000 (UTC)
commit 2749b473ce2c4c4d2876835dd8483157eb00c869
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 26 22:25:36 2014 -0500
x11: Handle obsolete selection requests without crashing
The ICCCM says:
If the specified property is None , the requestor is an obsolete client.
Owners are encouraged to support these clients by using the specified
target atom as the property name to be used for the reply.
Lets do that, instead of crashing.
https://bugzilla.gnome.org/show_bug.cgi?id=740613
gdk/x11/gdkdisplay-x11.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 1db4742..d654703 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -927,7 +927,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
event->selection.selection = gdk_x11_xatom_to_atom_for_display (display, xevent->xselection.selection);
event->selection.target = gdk_x11_xatom_to_atom_for_display (display, xevent->xselection.target);
if (xevent->xselection.property == None)
- event->selection.property = GDK_NONE;
+ event->selection.property = event->selection.target;
else
event->selection.property = gdk_x11_xatom_to_atom_for_display (display, xevent->xselection.property);
event->selection.time = xevent->xselection.time;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]