- Apply upstream patch to fix libxklavier crash (bug 452966)

This commit is contained in:
Ray Strode 2008-06-27 14:15:11 +00:00
parent 0fabb81e0f
commit 2091fa83c3
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,24 @@
--- libxklavier-2.1/libxklavier/xklavier_util.orig Wed Feb 27 20:14:01 2008
+++ libxklavier-2.1/libxklavier/xklavier_util.c Wed Feb 27 20:16:52 2008
@@ -114,7 +114,10 @@ xkl_get_debug_window_title(XklEngine * e
static gchar sname[33];
gchar *name;
strcpy(sname, "NULL");
- if (win != (Window) NULL) {
+
+ if (win == (Window *) PointerRoot) {
+ strcpy(sname, "ROOT");
+ } else if (win != (Window *) None) {
name = xkl_engine_get_window_title(engine, win);
if (name != NULL) {
snprintf(sname, sizeof(sname), "%.32s", name);
--- libxklavier-2.1/libxklavier/xklavier_toplevel.orig Wed Feb 27 20:36:09 2008
+++ libxklavier-2.1/libxklavier/xklavier_toplevel.c Wed Feb 27 20:36:14 2008
@@ -205,6 +205,7 @@ xkl_engine_find_toplevel_window(XklEngin
gboolean rv;
if (win == (Window) NULL
+ || win == (Window *) PointerRoot
|| win == xkl_engine_priv(engine, root_window)) {
*toplevel_win_out = (Window) NULL;
xkl_last_error_message = "The window is either 0 or root";

View File

@ -1,7 +1,7 @@
Summary: library providing high-level API for X Keyboard Extension
Name: libxklavier
Version: 3.6
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
Group: Development/Libraries
URL: http://gswitchit.sourceforge.net/
@ -15,6 +15,8 @@ BuildRequires: iso-codes-devel
Source: http://download.gnome.org/sources/libxklavier/3.6/libxklavier-3.6.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: libxklavier-2.1-vnc-bug.patch
%description
libxklavier is a library providing high-level API for X Keyboard Extension
known as XKB. This library is intended to support XFree86 and other
@ -34,6 +36,7 @@ Libraries, include files, etc you can use to develop libxklavier applications.
%prep
%setup -q
%patch0 -p1 -b .vnc-bug
%build
@ -69,6 +72,9 @@ rm -rf %{buildroot}
%{_datadir}/gtk-doc/html/libxklavier/
%changelog
* Fri Jun 27 2008 Ray Strode <rstrode@redhat.com> - 3.6-2
- Apply upstream patch to fix libxklavier crash (bug 452966)
* Wed Apr 30 2008 Matthias Clasen <mclasen@redhat.com> - 3.6-1
- Update to 3.6