rpms/kinput2/FC-6 kinput2-v3.1-status-update-204892.patch,NONE,1.1

Akira Tagoh (tagoh) fedora-extras-commits at redhat.com
Fri Jan 26 12:05:08 UTC 2007


Author: tagoh

Update of /cvs/extras/rpms/kinput2/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18489

Added Files:
	kinput2-v3.1-status-update-204892.patch 
Log Message:


kinput2-v3.1-status-update-204892.patch:

--- NEW FILE kinput2-v3.1-status-update-204892.patch ---
diff -ur kinput2-v3.1.orig/lib/imlib/imattr.c kinput2-v3.1/lib/imlib/imattr.c
--- kinput2-v3.1.orig/lib/imlib/imattr.c	2006-07-13 18:26:54.000000000 +0900
+++ kinput2-v3.1/lib/imlib/imattr.c	2006-07-13 18:28:12.000000000 +0900
@@ -1851,7 +1851,7 @@
     if (mask & ATTR_MASK_PREEDIT_STATE) {
 	/* unless the client specified, we should start with disabled state. */
 	ap->set_mask |= ATTR_MASK_PREEDIT_STATE;
-	ap->reset_state = XIMPreeditDisable;
+	ap->preedit_state = XIMPreeditDisable;
     }
     if (mask & ATTR_MASK_RESET_STATE) {
 	/* the default reset state must be the initial state. */
diff -ur kinput2-v3.1.orig/lib/imlib/imconv.c kinput2-v3.1/lib/imlib/imconv.c
--- kinput2-v3.1.orig/lib/imlib/imconv.c	2006-07-13 18:26:54.000000000 +0900
+++ kinput2-v3.1/lib/imlib/imconv.c	2006-07-13 18:28:12.000000000 +0900
@@ -911,11 +911,20 @@
 	ICClearConversion(input_obj);
 	TRACE(("\twas converting. %d bytes left\n", num_bytes));
 
+#if 0
+	/*
+	 * IMStopConversion() seems to not work correctly while
+	 * resetting IC. So this block was moved to ximResetICProc().
+	 * If calling IMResetIC() is required in other functions,
+	 * the following block is also used in it.
+	 */
 	if (icp->common_attr.reset_state == XIMInitialState) {
 	    /* Force to end the conversion. */
 	    TRACE(("\tback to the initial state\n"));
 	    IMStopConversion(icp);
 	}
+#endif
+
     }
     return num_bytes;
 }
@@ -967,6 +976,42 @@
 
 /* ARGSUSED */
 void
+IMStatusDraw(icp)
+IMIC *icp;
+{
+    Widget input_obj;
+    OCCPreeditDrawArg arg;
+
+    TRACE(("IMStatusDraw(ic%d)\n", icp->id));
+    if (!(icp->common_attr.input_style & XIMStatusCallbacks))
+	return;
+
+
+    arg.caret = 0;         /* ignored */
+    arg.chg_first = 0;     /* ignored */
+    arg.chg_length = 0;    /* ignored */
+    arg.encoding = IMCtextAtom(icp->im->connection->proto_widget);
+    arg.format = 0;        /* set by ICGetStatusString */
+    arg.text_length = 0;   /* set by ICGetStatusString */
+    arg.text = NULL;       /* set by ICGetStatusString */
+    arg.attrs_length = 0;  /* ignored */
+    arg.attrs = NULL;      /* ignored */
+
+    if (icp->conversion) {
+	XtVaGetValues(icp->conversion, XtNinputObject, &input_obj, NULL);
+	if (ICGetStatusString(input_obj, &arg.encoding, &arg.format,
+			      &arg.text_length, &arg.text,
+			      &arg.attrs_length) == -1)
+	return;
+    }
+
+    statusDraw(icp, &arg);
+
+    XtFree((char *)arg.text);
+}
+
+/* ARGSUSED */
+void
 IMStatusDone(icp)
 IMIC *icp;
 {
diff -ur kinput2-v3.1.orig/lib/imlib/imfuncs.h kinput2-v3.1/lib/imlib/imfuncs.h
--- kinput2-v3.1.orig/lib/imlib/imfuncs.h	2006-07-13 18:26:54.000000000 +0900
+++ kinput2-v3.1/lib/imlib/imfuncs.h	2006-07-13 18:28:12.000000000 +0900
@@ -102,6 +102,7 @@
 extern void IMSetFocus _Pt_((IMIC *icp));
 extern void IMUnsetFocus _Pt_((IMIC *icp));
 extern void IMStatusStart _Pt_((IMIC *icp));
+extern void IMStatusDraw _Pt_((IMIC *icp));
 extern void IMStatusDone _Pt_((IMIC *icp));
 extern void IMStartForwarding _Pt_((IMIC *icp));
 extern void IMStopForwarding _Pt_((IMIC *icp));
diff -ur kinput2-v3.1.orig/lib/imlib/imrequest.c kinput2-v3.1/lib/imlib/imrequest.c
--- kinput2-v3.1.orig/lib/imlib/imrequest.c	2006-07-13 18:26:54.000000000 +0900
+++ kinput2-v3.1/lib/imlib/imrequest.c	2006-07-13 18:28:16.000000000 +0900
@@ -1352,8 +1352,20 @@
     IMPutC16(conn, (unsigned int)text_length);
     if (text_length > 0) IMPutString(conn, text, text_length);
     IMFinishRequest(conn, offset);
+    /*
+     * Send RESET_IC_REPLY 
+     */
+    IMFlush(conn);
     if (text != NULL) XtFree(text);
     icp->state &= ~IC_RESETTING;
+
+    IMStatusDraw(icp);
+   /* moved from IMResetIC() */
+    if (icp->common_attr.reset_state == XIMInitialState) {
+	/* Force to end the conversion. */
+	TRACE(("\tback to the initial state\n"));
+	IMStopConversion(icp);
+    }
 }
 
 /*- ximExtMoveProc: handle XIM_EXT_MOVE request -*/
Only in kinput2-v3.1/lib/imlib: imrequest.c.orig




More information about the fedora-extras-commits mailing list