- Fixed with RHEL5 clone bug #201284: XIM hangs when switching Input

Context.
- Patch file is created by Soeren Sandmann Pedersen (sandmann@redhat.com).
This commit is contained in:
cchance 2006-11-09 02:53:18 +00:00
parent 2288947c64
commit cd0a25bbd4
2 changed files with 69 additions and 1 deletions

62
bug-201284.patch Normal file
View File

@ -0,0 +1,62 @@
--- libX11-1.0.3/modules/im/ximcp/imDefLkup.c.bug-201284 2006-10-30 23:58:41.000000000 -0500
+++ libX11-1.0.3/modules/im/ximcp/imDefLkup.c 2006-10-30 23:58:41.000000000 -0500
@@ -216,8 +216,13 @@
Xic ic,
BITMASK16 mode)
{
- if (mode & XimSYNCHRONUS) /* SYNC Request */
- MARK_NEED_SYNC_REPLY(ic);
+ if (mode & XimSYNCHRONUS) /* SYNC Request */ {
+ if (IS_FOCUSED(ic))
+ MARK_NEED_SYNC_REPLY(ic);
+ else
+ _XimProcSyncReply(ic->core.im, ic);
+ }
+
return True;
}
--- libX11-1.0.3/modules/im/ximcp/imDefIc.c.bug-201284 2006-06-22 17:22:22.000000000 -0400
+++ libX11-1.0.3/modules/im/ximcp/imDefIc.c 2006-10-30 23:58:41.000000000 -0500
@@ -949,6 +949,8 @@
(void)_XimWrite(im, len, (XPointer)buf);
_XimFlush(im);
+ MARK_FOCUSED(ic);
+
_XimRegisterFilter(ic);
return;
}
@@ -994,6 +996,8 @@
(void)_XimWrite(im, len, (XPointer)buf);
_XimFlush(im);
+ UNMARK_FOCUSED(ic);
+
_XimUnregisterFilter(ic);
return;
}
--- libX11-1.0.3/src/xlibi18n/XimintP.h.bug-201284 2006-06-22 17:22:23.000000000 -0400
+++ libX11-1.0.3/src/xlibi18n/XimintP.h 2006-10-31 00:01:30.000000000 -0500
@@ -244,6 +244,7 @@
#define IC_CONNECTED (1L)
#define FABLICATED (1L << 1)
#define NEED_SYNC_REPLY (1L << 2)
+#define FOCUSED (1L << 3)
/*
* macro for the flag of XICPrivateRec
@@ -269,6 +270,13 @@
#define UNMARK_NEED_SYNC_REPLY(ic) \
(((Xic)ic)->private.proto.flag &= ~NEED_SYNC_REPLY)
+#define IS_FOCUSED(ic) \
+ (((Xic)ic)->private.proto.flag & FOCUSED)
+#define MARK_FOCUSED(ic) \
+ (((Xic)ic)->private.proto.flag |= FOCUSED)
+#define UNMARK_FOCUSED(ic) \
+ (((Xic)ic)->private.proto.flag &= ~FOCUSED)
+
/*
* macro for the filter_event_mask of XICPrivateRec
*/

View File

@ -1,7 +1,7 @@
Summary: X.Org X11 libX11 runtime library
Name: libX11
Version: 1.0.3
Release: 5%{?dist}
Release: 6%{?dist}
License: MIT/X11
Group: System Environment/Libraries
URL: http://www.x.org
@ -15,6 +15,7 @@ Patch0: libX11-0.99.3-datadir-locale-dir-fix.patch
# manually confirm each patch hunk before removal.
Patch1: libX11-nls-indic-locales-bug185376.patch
Patch2: dont-forward-keycode-0.patch
Patch3: bug-201284.patch
BuildRequires: pkgconfig
# xproto >= 7.0.6 required
@ -55,6 +56,7 @@ X.Org X11 libX11 development package
#%patch0 -p0 -b .datadir-locale-dir-fix
%patch1 -p1 -b .nls-indic-locales-bug185376
%patch2 -p1 -b .dont-forward-keycode-0
%patch3 -p1 -b .3-bug201284
# Disable static library creation by default.
%define with_static 0
@ -247,6 +249,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*.3x*
%changelog
* Thu Nov 09 2006 Caius Chance <cchance@redhat.com> 1.0.3-6.fc7
- Fixed with RHEL5 clone bug #201284: XIM hangs when switching Input Context.
- Patch file is created by Soeren Sandmann Pedersen (sandmann@redhat.com).
* Fri Oct 13 2006 Kristian Høgsberg <krh@redhat.com> 1.0.3-5.fc7
- Add pkgconfig dependency for -devel package.