Package init

This commit is contained in:
overweight 2019-09-30 10:59:10 -04:00
commit 5e4bb96575
3 changed files with 125 additions and 0 deletions

View File

@ -0,0 +1,53 @@
diff -up libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx libX11-1.6.3/modules/im/ximcp/imDefFlt.c
--- libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx 2015-03-09 18:28:45.000000000 -0400
+++ libX11-1.6.3/modules/im/ximcp/imDefFlt.c 2015-03-10 12:32:31.912149644 -0400
@@ -142,7 +142,7 @@ _XimProtoKeypressFilter(
{
Xim im = (Xim)ic->core.im;
- if (IS_FABRICATED(im)) {
+ if ((ev->keycode == 0) || IS_FABRICATED(im)) {
_XimPendingFilter(ic);
UNMARK_FABRICATED(im);
return NOTFILTERD;
diff -up libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx libX11-1.6.3/modules/im/ximcp/imDefLkup.c
--- libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx 2015-03-09 18:28:45.000000000 -0400
+++ libX11-1.6.3/modules/im/ximcp/imDefLkup.c 2015-03-10 12:32:31.911149637 -0400
@@ -332,6 +332,17 @@ _XimForwardEvent(
XEvent *ev,
Bool sync)
{
+ /*
+ * Don't forward a key event which has keycode=0.
+ * keycode=0 is reserved for special purpose to let Xmb/wcLookupString()
+ * functions know that there is a commited string available from IM.
+ */
+ if (((ev->type == KeyPress) || (ev->type == KeyRelease))) {
+ if (((XKeyEvent *)ev)->keycode == 0) {
+ return True;
+ }
+ }
+
#ifdef EXT_FORWARD
if (((ev->type == KeyPress) || (ev->type == KeyRelease)))
if (_XimExtForwardKeyEvent(ic, (XKeyEvent *)ev, sync))
@@ -604,6 +615,19 @@ _XimUnregCommitInfo(
Xfree(info->keysym);
ic->private.proto.commit_info = info->next;
Xfree(info);
+
+ /*
+ * "Commit" uses fabricated flag to process a commited string
+ * from IM engine.
+ * Turn off the fabricated flag here (unregister the commited
+ * information function). Otherwise, next regular key press
+ * event will be ignored at _XimProtoKeypressFilter() and it
+ * will not be passed to IM engine.
+ */
+ if (IS_FABRICATED(ic)) {
+ UNMARK_FABRICATED(ic);
+ }
+
return;
}

BIN
libX11-1.6.7.tar.bz2 Normal file

Binary file not shown.

72
libX11.spec Normal file
View File

@ -0,0 +1,72 @@
Name: libX11
Version: 1.6.7
Release: 1
License: MIT
Summary: Core X11 protocol client library
URL: https://www.x.org
Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2
Patch0: dont-forward-keycode-0.patch
BuildRequires: xorg-x11-util-macros xorg-x11-proto-devel libXdmcp-devel
BuildRequires: xorg-x11-xtrans-devel libxcb-devel libXau-devel perl-Pod-Usage
Provides: libX11-common libX11-xcb
Obsoletes: libX11-common libX11-xcb
%description
Core X11 protocol client library.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for %{name}.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
autoreconf -ivf
%configure --disable-silent-rules
%make_build
%install
%make_install INSTALL="install -p"
mkdir -p $RPM_BUILD_ROOT/var/cache/libX11/compose
%delete_la
%check
make %{?_smp_mflags} check
%ldconfig_scriptlets
%files
%defattr(-,root,root)
%doc AUTHORS COPYING
%{_datadir}/X11/locale/*
%{_datadir}/X11/XErrorDB
%dir /var/cache/libX11/compose
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/*.so
%{_includedir}/X11/*.h
%{_libdir}/pkgconfig/*.pc
%files help
%defattr(-,root,root)
%doc README NEWS
%{_mandir}/*/*
%exclude %{_docdir}
%exclude %{_datadir}/X11/Xcms.txt
%changelog
* Fri Aug 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.6.7-1
- Package init