rpms/kinput2/devel kinput2-v3.1-status-update-204892.patch, NONE, 1.1 kinput2.spec, 1.7, 1.8 kinput2-redraw.patch, 1.1, NONE

Akira Tagoh (tagoh) fedora-extras-commits at redhat.com
Fri Jan 26 11:52:07 UTC 2007


Author: tagoh

Update of /cvs/extras/rpms/kinput2/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14808

Modified Files:
	kinput2.spec 
Added Files:
	kinput2-v3.1-status-update-204892.patch 
Removed Files:
	kinput2-redraw.patch 
Log Message:
* Fri Jan 26 2007 Akira TAGOH <tagoh at redhat.com> - v3.1-30
- Backport a patch to update the status with XmbResetIC() properly.
- Disable Wnn support so that no *Wnn* devel package available anymore.

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


Index: kinput2.spec
===================================================================
RCS file: /cvs/extras/rpms/kinput2/devel/kinput2.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- kinput2.spec	11 Sep 2006 03:11:22 -0000	1.7
+++ kinput2.spec	26 Jan 2007 11:51:37 -0000	1.8
@@ -9,8 +9,8 @@
 # I mean build_canna_wnn6 is prior than build_wnn4.
 %define	build_with_wnn4		0
 %define	build_with_wnn6		0
-%define build_with_canna	0
-%define	build_with_canna_wnn4	1
+%define build_with_canna	1
+%define	build_with_canna_wnn4	0
 %define	build_with_canna_wnn6	0
 
 %define	inst_alternatives_canna	alternatives --install %{_sysconfdir}/X11/xinit/xinput.d/ja_JP xinput-ja_JP %{_sysconfdir}/X11/xinit/xinput.d/%{name}-canna 40
@@ -25,7 +25,7 @@
 
 Name: kinput2
 Version: v3.1
-Release: 29%{?dist}
+Release: 30%{?dist}
 License: Distributable
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: libICE-devel libSM-devel libX11-devel libXaw-devel libXext-devel libXmu-devel libXpm-devel libXt-devel libXp-devel
@@ -59,7 +59,7 @@
 Patch7: kinput2-v3.1-fix-gcc-warning.patch
 Patch8: kinput2-v3.1-activate_im_with_kanji.patch
 Patch9: kinput2-v3.1-jp106_xfer.patch
-Patch10: kinput2-redraw.patch
+Patch10: kinput2-v3.1-status-update-204892.patch
 
 Summary: kinput2 - kanji input server for X11
 Group: User Interface/X
@@ -153,9 +153,11 @@
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/app-defaults
 install -c -m 0444 cmd/Kinput2.ad $RPM_BUILD_ROOT%{_datadir}/X11/app-defaults/Kinput2
 
+%if %{is_wnn_used}
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/X11/ccdef
-install -c -m 0444 ccdef/ccdef.* $RPM_BUILD_ROOT%{_libdir}/X11/ccdef
-install -c -m 0444 ccdef/rule.*  $RPM_BUILD_ROOT%{_libdir}/X11/ccdef
+install -c -m 0444 ccdef/ccdef.* $RPM_BUILD_ROOT/usr/lib/X11/ccdef
+install -c -m 0444 ccdef/rule.*  $RPM_BUILD_ROOT/usr/lib/X11/ccdef
+%endif
 
 make install.man DESTDIR=$RPM_BUILD_ROOT
 
@@ -238,6 +240,10 @@
 %{_sysconfdir}/X11/xinit/xinput.d
 
 %changelog
+* Fri Jan 26 2007 Akira TAGOH <tagoh at redhat.com> - v3.1-30
+- Backport a patch to update the status with XmbResetIC() properly.
+- Disable Wnn support so that no *Wnn* devel package available anymore.
+
 * Mon Sep 11 2006 Akira TAGOH <tagoh at redhat.com> - v3.1-29
 - rebuilt
 


--- kinput2-redraw.patch DELETED ---




More information about the scm-commits mailing list