rpms/fvkbd/devel workarea.patch,NONE,1.1 fvkbd.spec,1.1,1.2
Peter Robinson
pbrobinson at fedoraproject.org
Tue Jan 12 08:57:58 UTC 2010
- Previous message: rpms/libmx/devel .cvsignore, 1.2, 1.3 libmx.spec, 1.2, 1.3 sources, 1.2, 1.3 import.log, 1.1, NONE libmx-gtkdoc.patch, 1.1, NONE
- Next message: File gtkhtml-3.29.5.tar.bz2 uploaded to lookaside cache by mcrha
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pbrobinson
Update of /cvs/pkgs/rpms/fvkbd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7569
Modified Files:
fvkbd.spec
Added Files:
workarea.patch
Log Message:
- Add patch to fix crash on x86_64 platforms
workarea.patch:
misc-utility.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
--- NEW FILE workarea.patch ---
diff --git a/src/misc-utility.c b/src/misc-utility.c
index 232dec2..c5fe6f6 100644
--- a/src/misc-utility.c
+++ b/src/misc-utility.c
@@ -48,7 +48,8 @@ get_workarea(int *x, int *y, int *width, int *height)
Atom workarea_atom, type;
int ret, format;
unsigned long item_nums, remain_bytes;
- int *workarea = NULL;
+ unsigned char *workarea = NULL;
+ int size;
Display *xdpy;
int xscreen;
@@ -67,14 +68,21 @@ get_workarea(int *x, int *y, int *width, int *height)
return FALSE;
}
+ size = format / 8;
+ if ((format == 32) && (size != sizeof(long))){
+ // It seems that on some x86_64 machine, the data of _NET_WORKAREA is actually 64 bit
+ // though format said it is 32. It might be the bug of WM?
+ size = 8; //hack it!
+ }
+
if (x != NULL)
- *x = *workarea;
+ *x = *(int*)workarea;
if (y != NULL)
- *y = *(workarea + 1);
+ *y = *(int*)(workarea + size);
if (width != NULL)
- *width = *(workarea + 2);
+ *width = *(int*)(workarea + size * 2);
if (height != NULL)
- *height = *(workarea + 3);
+ *height = *(int*)(workarea + size * 3);
XFree(workarea);
Index: fvkbd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/fvkbd/devel/fvkbd.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- fvkbd.spec 19 Nov 2009 21:15:22 -0000 1.1
+++ fvkbd.spec 12 Jan 2010 08:57:57 -0000 1.2
@@ -1,6 +1,6 @@
Name: fvkbd
Version: 0.1.6
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Free Virtual Keyboard
Group: System Environment/Libraries
@@ -8,6 +8,7 @@ License: LGPLv2
URL: http://www.moblin.org/
Source0: http://git.moblin.org/cgit.cgi/%{name}/snapshot/%{name}-%{version}.tar.bz2
Patch0: fvkbd-fixdesktop.patch
+Patch1: workarea.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: clutter-devel
@@ -37,6 +38,7 @@ Files for development with %{name}.
%prep
%setup -q
%patch0 -p1 -b .fixdesktop
+%patch1 -p1 -b .workarea
# run autogen.sh until we have a proper release, but don't run configure twice.
sed -i '/configure/d' autogen.sh
@@ -78,6 +80,9 @@ rm -rf %{buildroot}
%{_libdir}/libfvkbd-gtk-0.1.so
%changelog
+* Tue Jan 12 2010 Peter Robinson <pbrobinson at gmail.com> 0.4.0-1
+- Add patch to fix crash on x86_64 platforms
+
* Sun Nov 15 2009 Peter Robinson <pbrobinson at gmail.com> 0.1.6-2
- Package review updates
- Previous message: rpms/libmx/devel .cvsignore, 1.2, 1.3 libmx.spec, 1.2, 1.3 sources, 1.2, 1.3 import.log, 1.1, NONE libmx-gtkdoc.patch, 1.1, NONE
- Next message: File gtkhtml-3.29.5.tar.bz2 uploaded to lookaside cache by mcrha
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list