summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-11-12 19:48:43 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-11-12 19:48:43 +0000
commit3b9a31df075d4a53aaf1d592adc81a0dfc8996f7 (patch)
tree61f66747e5c94cdbfb489e3dd1e11c3072cc14db /gdk/x11
parent888aeacf51f4a60d0c5120b027f51c540f862d40 (diff)
downloadgtk+-3b9a31df075d4a53aaf1d592adc81a0dfc8996f7.tar.gz
Make GDK+ compile with X11R5 (#148032)
2004-11-12 Matthias Clasen <mclasen@redhat.com> Make GDK+ compile with X11R5 (#148032) * gdk/x11/xsettings-client.c (xsettings_client_new): * gdk/x11/gdkproperty-x11.c (_gdk_x11_precache_atoms): Only use XInternAtoms if it is available. * gdk/x11/gdkasync.c: Include XIproto.h if necessary. * configure.in: Check for XInternAtoms and X headers needed for xReply.
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkasync.c3
-rw-r--r--gdk/x11/gdkproperty-x11.c15
-rw-r--r--gdk/x11/xsettings-client.c6
3 files changed, 20 insertions, 4 deletions
diff --git a/gdk/x11/gdkasync.c b/gdk/x11/gdkasync.c
index 812064d07f..61f25fbdf1 100644
--- a/gdk/x11/gdkasync.c
+++ b/gdk/x11/gdkasync.c
@@ -44,6 +44,9 @@ in this Software without prior written authorization from The Open Group.
*/
#include <config.h>
+#ifdef NEED_XIPROTO_H_FOR_XREPLY
+#include <X11/extensions/XIproto.h>
+#endif
#include <X11/Xlibint.h>
#include "gdkalias.h"
#include "gdkasync.h"
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index c1cb0adfec..2a625af05b 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -229,8 +229,16 @@ _gdk_x11_precache_atoms (GdkDisplay *display,
}
if (n_xatoms)
- XInternAtoms (GDK_DISPLAY_XDISPLAY (display),
- (char **)xatom_names, n_xatoms, False, xatoms);
+ {
+#ifdef HAVE_XINTERNATOMS
+ XInternAtoms (GDK_DISPLAY_XDISPLAY (display),
+ (char **)xatom_names, n_xatoms, False, xatoms);
+#else
+ for (i = 0; i < n_xatoms; i++)
+ xatoms[i] = XInternAtom (GDK_DISPLAY_XDISPLAY (display),
+ xatom_names[i], False);
+#endif
+ }
for (i = 0; i < n_xatoms; i++)
insert_atom_pair (display, atoms[i], xatoms[i]);
@@ -414,8 +422,7 @@ gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display,
*
* Returns the X atom for GDK's default display corresponding to @atom_name.
* This function caches the result, so if called repeatedly it is much
- * faster than <function>XInternAtom()</function>, which is a round trip to
- * the server each time.
+ * faster than XInternAtom(), which is a round trip to the server each time.
*
* Return value: a X atom for GDK's default display.
**/
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index 46a562d0bf..a965d20f07 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -480,7 +480,13 @@ xsettings_client_new (Display *display,
atom_names[1] = "_XSETTINGS_SETTINGS";
atom_names[2] = "MANAGER";
+#ifdef HAVE_XINTERNATOMS
XInternAtoms (display, atom_names, 3, False, atoms);
+#else
+ atoms[0] = XInternAtom (display, atom_names[0], False);
+ atoms[1] = XInternAtom (display, atom_names[1], False);
+ atoms[2] = XInternAtom (display, atom_names[2], False);
+#endif
client->selection_atom = atoms[0];
client->xsettings_atom = atoms[1];