diff options
author | Owen Taylor <owt1@cornell.edu> | 1998-02-25 03:43:10 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-02-25 03:43:10 +0000 |
commit | 203476915af832a6974f7050dfc6d2b12baed2cb (patch) | |
tree | 8794b6e09b6f4c87aa7419fef5bb4b9e7a3e3f5c | |
parent | c88ea382d29a7200eeffe6856a2cc62b170801de (diff) | |
download | gtk+-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.c | 8 | ||||
-rw-r--r-- | gdk/x11/gdkmain-x11.c | 8 |
2 files changed, 12 insertions, 4 deletions
@@ -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; } |