diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-06-17 12:56:05 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2009-06-17 12:56:05 +0200 |
commit | 7303f3c9fdc2fcb75907a3fd81cc4a44446931a7 (patch) | |
tree | 7607ea832b4c8ddb1f61240b7ca43299f9f67e6e /gdk/x11/gdkproperty-x11.c | |
parent | c08bf93fe5fd0f7192aec9ad0358da246c211e0f (diff) | |
parent | 1a385c50f041cdcc8ee88b27af85094901c2b05d (diff) | |
download | gtk+-7303f3c9fdc2fcb75907a3fd81cc4a44446931a7.tar.gz |
Merge branch 'master' into client-side-windows
This updates client-side-windows to the the latest soname
change for easier testing.
Conflicts:
gdk/x11/gdkwindow-x11.c
tests/Makefile.am
Diffstat (limited to 'gdk/x11/gdkproperty-x11.c')
-rw-r--r-- | gdk/x11/gdkproperty-x11.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c index 9123990b60..181b13e819 100644 --- a/gdk/x11/gdkproperty-x11.c +++ b/gdk/x11/gdkproperty-x11.c @@ -173,37 +173,40 @@ lookup_cached_xatom (GdkDisplay *display, /** * gdk_x11_atom_to_xatom_for_display: * @display: A #GdkDisplay - * @atom: A #GdkAtom - * + * @atom: A #GdkAtom, or %GDK_NONE + * * Converts from a #GdkAtom to the X atom for a #GdkDisplay - * with the same string value. - * - * Return value: the X atom corresponding to @atom. + * with the same string value. The special value %GDK_NONE + * is converted to %None. + * + * Return value: the X atom corresponding to @atom, or %None * * Since: 2.2 **/ Atom -gdk_x11_atom_to_xatom_for_display (GdkDisplay *display, - GdkAtom atom) +gdk_x11_atom_to_xatom_for_display (GdkDisplay *display, + GdkAtom atom) { Atom xatom = None; - + g_return_val_if_fail (GDK_IS_DISPLAY (display), None); - g_return_val_if_fail (atom != GDK_NONE, None); + + if (atom == GDK_NONE) + return None; if (display->closed) return None; - + xatom = lookup_cached_xatom (display, atom); - + if (!xatom) { char *name; - + g_return_val_if_fail (ATOM_TO_INDEX (atom) < virtual_atom_array->len, None); name = g_ptr_array_index (virtual_atom_array, ATOM_TO_INDEX (atom)); - + xatom = XInternAtom (GDK_DISPLAY_XDISPLAY (display), name, FALSE); insert_atom_pair (display, atom, xatom); } |