Avoid warnings when handling SelectionNotify

The property field in SelectionNotify events may be None instead
of an atom.
This commit is contained in:
Matthias Clasen 2009-05-17 18:34:21 -04:00
parent 5133d934f6
commit 375d19aa92

View File

@ -1985,7 +1985,10 @@ gdk_event_translate (GdkDisplay *display,
event->selection.window = window;
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);
event->selection.property = gdk_x11_xatom_to_atom_for_display (display, xevent->xselection.property);
if (xevent->xselection.property == None)
event->selection.property = GDK_NONE;
else
event->selection.property = gdk_x11_xatom_to_atom_for_display (display, xevent->xselection.property);
event->selection.time = xevent->xselection.time;
break;