summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-02-25 03:43:10 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-02-25 03:43:10 +0000
commit203476915af832a6974f7050dfc6d2b12baed2cb (patch)
tree8794b6e09b6f4c87aa7419fef5bb4b9e7a3e3f5c
parentc88ea382d29a7200eeffe6856a2cc62b170801de (diff)
downloadgtk+-203476915af832a6974f7050dfc6d2b12baed2cb.tar.gz
Check the result of XGetICValues - it is failing for some reason, and
Tue Feb 24 22:44:01 1998 Owen Taylor <owt1@cornell.edu> * gdk/gdk.c (gdk_ic_get_events): Check the result of XGetICValues - it is failing for some reason, and causing some warnings to be printed.
-rw-r--r--gdk/gdk.c8
-rw-r--r--gdk/x11/gdkmain-x11.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 9f0d9bdb40..f65ed5242f 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -3537,7 +3537,11 @@ gdk_ic_get_events (GdkIC ic)
private = (GdkICPrivate *) ic;
- XGetICValues (private->xic, XNFilterEvents, &xmask, NULL);
+ if (XGetICValues (private->xic, XNFilterEvents, &xmask, NULL) != NULL)
+ {
+ GDK_NOTE (XIM, g_warning ("Call to XGetICValues: %s failed", XNFilterEvents));
+ return 0;
+ }
mask = 0;
for (i=0, bit=2; i < nevent_masks; i++, bit <<= 1)
@@ -3548,7 +3552,7 @@ gdk_ic_get_events (GdkIC ic)
}
if (xmask)
- g_warning ("ic requires the events not supported by the application (%04lx)", xmask);
+ g_warning ("ic requires events not supported by the application (%#04lx)", xmask);
return mask;
}
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index 9f0d9bdb40..f65ed5242f 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -3537,7 +3537,11 @@ gdk_ic_get_events (GdkIC ic)
private = (GdkICPrivate *) ic;
- XGetICValues (private->xic, XNFilterEvents, &xmask, NULL);
+ if (XGetICValues (private->xic, XNFilterEvents, &xmask, NULL) != NULL)
+ {
+ GDK_NOTE (XIM, g_warning ("Call to XGetICValues: %s failed", XNFilterEvents));
+ return 0;
+ }
mask = 0;
for (i=0, bit=2; i < nevent_masks; i++, bit <<= 1)
@@ -3548,7 +3552,7 @@ gdk_ic_get_events (GdkIC ic)
}
if (xmask)
- g_warning ("ic requires the events not supported by the application (%04lx)", xmask);
+ g_warning ("ic requires events not supported by the application (%#04lx)", xmask);
return mask;
}