1. Akira TAGOH
  2. libgxim

Commits

Akira TAGOH  committed 31ab1d8

check if LISTofXI*ATTRIBUTE contains only XI*ATTR that negotiated with XIM_OPEN_REPLY

  • Participants
  • Parent commits 6c2e3d7
  • Branches master

Comments (0)

Files changed (1)

File libgxim/gximprotocol.c

View file
  • Ignore whitespace
 		    process_attribute:
 			    list = va_arg(args, gpointer);
 			    for (l = list; l != NULL; l = g_slist_next(l)) {
+				    GXimAttribute *a = l->data;
+				    GXimValueType vt = g_xim_gtype_to_value_type(g_xim_attr_get_gtype_by_id(attr, a->id));
+
+				    if (a->vtype != vt) {
+					    g_xim_messages_warning(iface->message,
+								   "Unknown attribute ID is specified: %d (%s)",
+								   a->id, g_xim_value_type_name(a->vtype));
+				    }
 				    priv->n_sent += g_xim_attribute_put_to_stream(l->data, proto,
 										  cancellable, error);
 				    if (*error) {
 		gpointer value;
 		gsize padding, sz, size;
 		goffset cur_pos = g_seekable_tell(G_SEEKABLE (istream));
-		GType gtype;
+		GType gtype G_GNUC_UNUSED;
 		GXimAttr *attr;
 		GdkNativeWindow nw;