rpms/lesstif/devel lesstif-0.95.0-accelkeys.patch, NONE, 1.1 lesstif-0.95.0-cutpaste64.patch, NONE, 1.1 lesstif.spec, 1.14, 1.15

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Thu Aug 30 22:44:21 UTC 2007


Author: jwrdegoede

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

Modified Files:
	lesstif.spec 
Added Files:
	lesstif-0.95.0-accelkeys.patch lesstif-0.95.0-cutpaste64.patch 
Log Message:
* Thu Aug 30 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-18
- Fix cut and paste from / to lesstif apps on 64 bits machines (bz 243508)
- Fix accelkeys which use more then one modifier (bz 214018)


lesstif-0.95.0-accelkeys.patch:

--- NEW FILE lesstif-0.95.0-accelkeys.patch ---
diff -up lesstif-0.95.0/lib/Xm-2.1/Manager.c.accelkeys lesstif-0.95.0/lib/Xm-2.1/Manager.c
--- lesstif-0.95.0/lib/Xm-2.1/Manager.c.accelkeys	2005-04-02 16:58:11.000000000 +0200
+++ lesstif-0.95.0/lib/Xm-2.1/Manager.c	2007-08-31 00:19:19.000000000 +0200
@@ -1764,7 +1764,8 @@ _XmAcceleratorHandler(Widget w, XtPointe
 	 modifiers" or "these modifiers plus any others" */
 	if (/*MGR_KeyboardList(w)[i].eventType == event->type && */
 	    MGR_KeyboardList(w)[i].key == event->xkey.keycode &&
-	    (MGR_KeyboardList(w)[i].modifiers & event->xkey.state) == MGR_KeyboardList(w)[i].modifiers &&
+	    MGR_KeyboardList(w)[i].modifiers ==
+	        (event->xkey.state & ~(Mod2Mask | LockMask)) &&
 	    MGR_KeyboardList(w)[i].component == comp &&
 	    XtIsManaged(comp))
 	{

lesstif-0.95.0-cutpaste64.patch:

--- NEW FILE lesstif-0.95.0-cutpaste64.patch ---
diff -up lesstif-0.95.0/lib/Xm-2.1/CutPaste.c.cutpaste64 lesstif-0.95.0/lib/Xm-2.1/CutPaste.c
--- lesstif-0.95.0/lib/Xm-2.1/CutPaste.c.cutpaste64	2004-08-28 21:22:43.000000000 +0200
+++ lesstif-0.95.0/lib/Xm-2.1/CutPaste.c	2007-08-31 00:19:09.000000000 +0200
@@ -606,7 +606,16 @@ _XmClipboardGetWindowProperty(Display *d
 
 	ret_buf = (unsigned *)XtRealloc((char *)ret_buf,
 					alloc_size + alloc_incr + 1);
-	memcpy(&ret_buf[offset], prop, alloc_incr);
+        if (actual_format == 32 && sizeof(long) != 4)
+        {
+            int i;
+            unsigned long *in = (unsigned long *)prop;
+            
+            for (i = 0; i < nitems; i++)
+                ret_buf[offset + i] = in[i];
+        }
+        else
+	    memcpy(&ret_buf[offset], prop, alloc_incr);
 	alloc_size += alloc_incr;
 
 	switch (actual_format)
@@ -1001,8 +1012,9 @@ _XmClipboardReplaceItem(Display *display
 {
     Window root;
     Atom item;
-    int nunits, tstart, tlen;
+    int i, nunits, tstart, tlen;
     long transferlen;
+    long *convert_buf = NULL;
 
     root = DefaultRootWindow(display);
     item = _XmClipboardGetAtomFromId(display, id);
@@ -1014,6 +1026,12 @@ _XmClipboardReplaceItem(Display *display
     case 32:
 	len >>= 2;
 	nunits = transferlen;
+	/* XChangeProperty expects a buffer of longs when receiving 32 bits
+	   data, MEUHH */
+	if (sizeof(long) != 4)
+	    convert_buf = XtMalloc(len * sizeof(long));
+        for (i = 0; i < len; i++)
+            convert_buf[i] = data[i];
 	break;
 
     case 16:
@@ -1040,7 +1058,9 @@ _XmClipboardReplaceItem(Display *display
 	}
 
 	XChangeProperty(display, root, item, item, format, mode,
-			(unsigned char *)&data[tstart], tlen);
+			convert_buf? (unsigned char *)&convert_buf[tstart] :
+                                     (unsigned char *)&data[tstart],
+                        tlen);
 
 	len -= tlen;
 	mode = PropModeAppend;


Index: lesstif.spec
===================================================================
RCS file: /cvs/extras/rpms/lesstif/devel/lesstif.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- lesstif.spec	30 Aug 2007 18:36:04 -0000	1.14
+++ lesstif.spec	30 Aug 2007 22:43:44 -0000	1.15
@@ -1,7 +1,7 @@
 Summary: OSF/Motif(R) library clone
 Name: lesstif
 Version: 0.95.0
-Release: 17%{?dist}
+Release: 18%{?dist}
 License: LGPLv2+
 # in Xm-2.1/
 # some files are MIT
@@ -51,6 +51,8 @@
 Patch7: lesstif-64.patch
 Patch8: lesstif-0.95-resource-fix.patch
 Patch9: lesstif-0.95-text.patch
+Patch10: lesstif-0.95.0-cutpaste64.patch
+Patch11: lesstif-0.95.0-accelkeys.patch
 
 Url: http://www.lesstif.org/
 
@@ -147,6 +149,8 @@
 #%patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
+%patch11 -p1
 
 # and pick up some fixes from Debian
 patch -p1 < debian/patches/020_xpmpipethrough.diff
@@ -301,6 +305,10 @@
 
 
 %changelog
+* Thu Aug 30 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-18
+- Fix cut and paste from / to lesstif apps on 64 bits machines (bz 243508)
+- Fix accelkeys which use more then one modifier (bz 214018)
+
 * Thu Aug 30 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-17
 - Update included Debian 0.94.4-2 patch to the Debian 0.95.0-2 patch
 - Not only include but also actually apply Debian's patches (bz 261821)




More information about the fedora-extras-commits mailing list