rpms/lesstif/FC-6 lesstif-0.95.0-XxxxProperty-64bit.patch, NONE, 1.1 lesstif-0.95.0-attach-bottom-self.patch, NONE, 1.1 lesstif-0.95.0-xtungrab-warning.patch, NONE, 1.1 mwm.desktop, NONE, 1.1 lesstif.spec, 1.9, 1.10 lesstif-0.95.0-cutpaste64.patch, 1.1, NONE lesstif-64.patch, 1.1, NONE
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Sun Sep 2 20:57:10 UTC 2007
Author: jwrdegoede
Update of /cvs/extras/rpms/lesstif/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5890
Modified Files:
lesstif.spec
Added Files:
lesstif-0.95.0-XxxxProperty-64bit.patch
lesstif-0.95.0-attach-bottom-self.patch
lesstif-0.95.0-xtungrab-warning.patch mwm.desktop
Removed Files:
lesstif-0.95.0-cutpaste64.patch lesstif-64.patch
Log Message:
* Sat Sep 1 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-19
- Fix more 64 bit XChange/GetWindowProperty issues (inspired by the
cut and paste 64 bit fix which was an XChange/GetWindowProperty issue too)
- Fix z88: http://www.z88.uni-bayreuth.de/ not working with lesstif
- Stop lessstif from spewing messages about XtUngrab... (bz 210384)
lesstif-0.95.0-XxxxProperty-64bit.patch:
--- NEW FILE lesstif-0.95.0-XxxxProperty-64bit.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
@@ -62,7 +62,7 @@ static void _XmClipboardDeleteMarked(Dis
XmClipboard * clip);
static void _XmClipboardDeleteFormat(Display *display, int id);
static int _XmClipboardRegisterFormat(Display *display, char *format_name,
- int format_len);
+ long format_len);
static void _XmClipboardDeleteFormats(Display *display, Window window, int id);
static void _XmClipboardDeleteItem(Display *display, Window window,
XmClipboard * clip, unsigned item);
@@ -241,7 +241,7 @@
static int
-_XmClipboardRegisterFormat(Display *display, char *format_name, int format_len)
+_XmClipboardRegisterFormat(Display *display, char *format_name, long format_len)
{
Atom fmt;
int flen;
@@ -606,7 +606,17 @@ _XmClipboardGetWindowProperty(Display *d
ret_buf = (unsigned *)XtRealloc((char *)ret_buf,
alloc_size + alloc_incr + 1);
- memcpy(&ret_buf[offset], prop, alloc_incr);
+ /* Fixup X*Property long == 32 bits confusion if needed */
+ 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 +1013,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 +1027,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 +1059,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;
@@ -1178,7 +1178,7 @@
}
else
{
- *format = *((int *)(prop));
+ *format = *((long *)(prop));
ret = True;
}
diff -ur lesstif-0.95.0.orig/clients/Motif-2.1/mwm/props.c lesstif-0.95.0/clients/Motif-2.1/mwm/props.c
--- lesstif-0.95.0.orig/clients/Motif-2.1/mwm/props.c 2004-08-28 21:25:46.000000000 +0200
+++ lesstif-0.95.0/clients/Motif-2.1/mwm/props.c 2007-09-01 15:54:50.000000000 +0200
@@ -92,15 +92,28 @@
void
PROP_SetBehavior(ScreenInfo *scr, Boolean custom)
{
- PropMotifWmInfo info;
+ long info[PROP_MWM_INFO_ELEMENTS];
- /* set the MWM_INFO property on the Root */
+ /* set the MWM_INFO property on the Root, notice that we
+ use an array of longs here and not the PropMotifWmInfo struct,
+ this is because this struct looks like this in lesstif:
+
+ typedef struct {
+ CARD32 flags;
+ CARD32 wmWindow;
+ } PropMotifWmInfo;
+
+ But when setting 32 bit properties XChangeProperty expects an array of
+ longs, which it will convert to 32 bit values if need. Thus passing an
+ actual PropMotifWmInfo struct will mess things up on archs where longs
+ are 64 bit. */
+
if (custom)
- info.flags = MWM_INFO_STARTUP_CUSTOM;
+ info[0] = MWM_INFO_STARTUP_CUSTOM; /* set flags "member" */
else
- info.flags = MWM_INFO_STARTUP_STANDARD;
+ info[0] = MWM_INFO_STARTUP_STANDARD; /* set flags "member" */
- info.wmWindow = scr->root_win;
+ info[1] = scr->root_win; /* set wmWindow "member" */
XChangeProperty(dpy, scr->root_win, XA_MWM_INFO, XA_MWM_INFO,
32, PropModeReplace,
@@ -129,7 +142,18 @@
int actual_format, ret;
Atom actual_type;
unsigned long nitems, bytesafter;
- PropMotifWmInfo *info;
+ /* We use a long pointer here and not a PropMotifWmInfo pointer,
+ this is because this type looks like this in lesstif:
+
+ typedef struct {
+ CARD32 flags;
+ CARD32 wmWindow;
+ } PropMotifWmInfo;
+
+ But when getting 32 bit properties XGetWindowProperty returns an array
+ of longs. Thus interpreting the returned data as PropMotifWmInfo will
+ mess things up on archs where longs are 64 bit. */
+ unsigned long *info;
if (XGetWindowProperty(dpy, scr->root_win, XA_MWM_INFO, 0L,
PROP_MOTIF_WM_INFO_ELEMENTS, False,
@@ -138,7 +162,7 @@
(unsigned char **)&info) == Success)
{
if (nitems > 0 && info)
- ret = info->flags;
+ ret = info[0]; /* Return flags "member" */
else
ret = 0;
XFree((char *)info);
@@ -284,7 +308,21 @@
{
if (nitems >= PROP_MOTIF_WM_HINTS_ELEMENTS)
+ {
+ /* Fixup X*Property long == 32 bits confusion if needed */
+ if (sizeof(long) != 4)
+ {
+ long *prop_hints = (long *)win->mwm_hints;
+ win->mwm_hints = XtMalloc(sizeof(MwmHints));
+ win->mwm_hints->flags = prop_hints[0];
+ win->mwm_hints->functions = prop_hints[1];
+ win->mwm_hints->decorations = prop_hints[2];
+ win->mwm_hints->input_mode = prop_hints[3];
+ win->mwm_hints->status = prop_hints[4];
+ XFree(prop_hints);
+ }
return;
+ }
XFree((char *)win->mwm_hints);
}
lesstif-0.95.0-attach-bottom-self.patch:
--- NEW FILE lesstif-0.95.0-attach-bottom-self.patch ---
diff -up lesstif-0.95.0/lib/Xm-2.1/Form.c~ lesstif-0.95.0/lib/Xm-2.1/Form.c
--- lesstif-0.95.0/lib/Xm-2.1/Form.c~ 2007-09-01 20:24:58.000000000 +0200
+++ lesstif-0.95.0/lib/Xm-2.1/Form.c 2007-09-01 20:24:58.000000000 +0200
@@ -2538,7 +2538,7 @@ _XmFormLayout(Widget f, Widget cw, XtWid
_XmWarning(child, "bottom ATTACH_SELF %s %d"
" no test coverage", __FILE__, __LINE__);
#endif
- SETH(XtHeight(child) - XtY(child)); /* FIX ME */
+ SETH(XtHeight(child));
FCP_Atta(con, BOTTOM).percent = (FCP_Y(con) + FCP_H(con) +
_XmGetOffset(child, BOTTOM)) *
Form_FractionBase(f) / fh;
lesstif-0.95.0-xtungrab-warning.patch:
--- NEW FILE lesstif-0.95.0-xtungrab-warning.patch ---
diff -up lesstif-0.95.0/lib/Xm-2.1/RowColumn.c~ lesstif-0.95.0/lib/Xm-2.1/RowColumn.c
--- lesstif-0.95.0/lib/Xm-2.1/RowColumn.c~ 2007-09-02 22:03:10.000000000 +0200
+++ lesstif-0.95.0/lib/Xm-2.1/RowColumn.c 2007-09-02 22:06:16.000000000 +0200
@@ -1014,6 +1014,10 @@ initialize(Widget request, Widget new_w,
}
+static void xtWarnCB(String message)
+{
+}
+
static void
destroy(Widget w)
{
@@ -1033,14 +1039,19 @@ destroy(Widget w)
if (realpar != NULL)
{
+ XtErrorHandler old_handler;
XtRemoveEventHandler(realpar,
ButtonPressMask|ButtonReleaseMask,
False, _XmPopupButtonPressHandler,
(XtPointer)w );
- /* Fix a grab problem -- dwilliss */
- fprintf(stderr, "XtUngrabButton(%s,%u,%u)\n",
- XtName(realpar), RC_PostButton(w), RC_PostModifiers(w));
+ /* Yes this may not be necessary, shut up Xt see:
+ http://sourceforge.net/tracker/index.php?func=detail&aid=1217326&group_id=8596&atid=108596 */
+ old_handler = XtAppSetWarningHandler(
+ XtWidgetToApplicationContext(realpar),
+ xtWarnCB);
XtUngrabButton(realpar, RC_PostButton(w), RC_PostModifiers(w));
+ XtAppSetWarningHandler(XtWidgetToApplicationContext(realpar),
+ old_handler);
}
}
--- NEW FILE mwm.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Mwm
Comment=Lesstif Motif window manager clone based on fvwm
Exec=mwm
Terminal=False
TryExec=mwm
[Window Manager]
SessionManaged=true
Index: lesstif.spec
===================================================================
RCS file: /cvs/extras/rpms/lesstif/FC-6/lesstif.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- lesstif.spec 30 Aug 2007 23:00:09 -0000 1.9
+++ lesstif.spec 2 Sep 2007 20:56:37 -0000 1.10
@@ -1,7 +1,7 @@
Summary: OSF/Motif(R) library clone
Name: lesstif
Version: 0.95.0
-Release: 18%{?dist}
+Release: 19%{?dist}
License: LGPLv2+
# in Xm-2.1/
# some files are MIT
@@ -46,13 +46,12 @@
Patch4: lesstif-0.95.0-c++fix.patch
Patch5: http://ftp.debian.org/debian/pool/main/l/lesstif2/lesstif2_0.95.0-2.diff.gz
Patch6: lesstif-0.95.0-scroll.patch
-# patch from kgallowa at redhat.com, to achieve API conformance with
-# openmotif on 64 bit.
-Patch7: lesstif-64.patch
Patch8: lesstif-0.95-resource-fix.patch
Patch9: lesstif-0.95-text.patch
-Patch10: lesstif-0.95.0-cutpaste64.patch
+Patch10: lesstif-0.95.0-XxxxProperty-64bit.patch
Patch11: lesstif-0.95.0-accelkeys.patch
+Patch12: lesstif-0.95.0-attach-bottom-self.patch
+Patch13: lesstif-0.95.0-xtungrab-warning.patch
Url: http://www.lesstif.org/
@@ -146,11 +145,12 @@
%patch4 -p1 -b .VendorSP
%patch5 -p1
%patch6 -p1
-#%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
+%patch12 -p1
+%patch13 -p1
# and pick up some fixes from Debian
patch -p1 < debian/patches/020_xpmpipethrough.diff
@@ -305,6 +305,12 @@
%changelog
+* Sat Sep 1 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-19
+- Fix more 64 bit XChange/GetWindowProperty issues (inspired by the
+ cut and paste 64 bit fix which was an XChange/GetWindowProperty issue too)
+- Fix z88: http://www.z88.uni-bayreuth.de/ not working with lesstif
+- Stop lessstif from spewing messages about XtUngrab... (bz 210384)
+
* 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-cutpaste64.patch DELETED ---
--- lesstif-64.patch DELETED ---
More information about the fedora-extras-commits
mailing list