From 8ddaf698b26ffb6601dcf46a992a0a628e3ba9b7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 25 2018 09:28:35 +0000 Subject: import motif-2.3.4-12.el7_4 --- diff --git a/SOURCES/motifzone_1612.patch b/SOURCES/motifzone_1612.patch new file mode 100644 index 0000000..bdea0ef --- /dev/null +++ b/SOURCES/motifzone_1612.patch @@ -0,0 +1,104 @@ +From 6aff3a819cb69235594124d7b252d1ee8c04f2b0 Mon Sep 17 00:00:00 2001 +From: Mykola Vshyvkov +Date: Wed, 21 Aug 2013 11:49:00 +0300 +Subject: [PATCH] Fixed bug #1612 (Label size computed wrong within a Form). + +--- + lib/Xm/Form.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 56 insertions(+), 2 deletions(-) + +diff --git a/lib/Xm/Form.c b/lib/Xm/Form.c +index 74140af8..b95a7b1a 100644 +--- a/lib/Xm/Form.c ++++ b/lib/Xm/Form.c +@@ -50,6 +50,7 @@ static char rcsid[] = "$TOG: Form.c /main/19 1998/03/25 12:24:56 csn $" + #include "GMUtilsI.h" + + #define FIX_1299 ++#define FIX_1612 + + #define MESSAGE1 _XmMMsgForm_0000 + #define MESSAGE5 _XmMMsgForm_0002 +@@ -285,6 +286,12 @@ static int GetFormOffset( + XmFormWidget fw, + int which, + XmFormAttachment a) ; ++#ifdef FIX_1612 ++static Boolean IsWidgetAttachedOneHorizontalSide( ++ Widget w); ++static Boolean IsWidgetAttachedOneVerticalSide( ++ Widget w); ++#endif + + /******** End Static Function Declarations ********/ + +@@ -1083,13 +1090,21 @@ GeometryManager( + } else { + /* the size the Form wants for the kid request is bigger than + its current or proposed size, return No to the kid */ +- + /* backup the original Form size first */ + fw->core.width = orig_form_width ; + fw->core.height = orig_form_height; +- + /* we haden't changed anything else, just return No */ + reply = XtGeometryNo; ++ ++#ifdef FIX_1612 ++ if (((IsWidgetAttachedOneHorizontalSide(w)) && ++ (desired->request_mode & CWWidth)) || ++ ((IsWidgetAttachedOneVerticalSide(w)) && ++ (desired->request_mode & CWHeight))) ++ { PlaceChildren (fw, w, desired); ++ reply = XtGeometryYes; ++ } ++#endif + } + } else { + /* ok, we got a Yes form the Form's parent, let's relayout +@@ -3477,3 +3492,42 @@ XmCreateFormDialog( + return XmeCreateClassDialog (xmFormWidgetClass, + parent, name, arglist, argcount) ; + } ++ ++ ++ ++#ifdef FIX_1612 ++/************************************************************************ ++ * ++ * IsWidgetAttachedOneHorizontalSide ++ * Checking the attachments of widget in horizontal direction. ++ * Returns True if only one (left or right) side of widget is attached ++ * ++ ************************************************************************/ ++static Boolean IsWidgetAttachedOneHorizontalSide(Widget w) ++ { if (w != NULL) ++ { XmFormConstraint c = GetFormConstraint(w); ++ if (((c->att[LEFT].type == XmATTACH_NONE) && ++ (c->att[RIGHT].type != XmATTACH_NONE)) || ++ ((c->att[LEFT].type != XmATTACH_NONE) && ++ (c->att[RIGHT].type == XmATTACH_NONE))) ++ return True; ++ ++ } ++ return False; ++ } ++ ++ ++static Boolean IsWidgetAttachedOneVerticalSide(Widget w) ++ { if (w != NULL) ++ { XmFormConstraint c = GetFormConstraint(w); ++ if (((c->att[TOP].type == XmATTACH_NONE) && ++ (c->att[BOTTOM].type != XmATTACH_NONE)) || ++ ((c->att[TOP].type != XmATTACH_NONE) && ++ (c->att[BOTTOM].type == XmATTACH_NONE))) ++ return True; ++ ++ } ++ return False; ++ } ++ ++#endif +-- +2.14.3 + diff --git a/SOURCES/motifzone_1660.patch b/SOURCES/motifzone_1660.patch new file mode 100644 index 0000000..c6d9b7c --- /dev/null +++ b/SOURCES/motifzone_1660.patch @@ -0,0 +1,27 @@ +From e5c51cda449ea3544fddcdb84c6809757477035b Mon Sep 17 00:00:00 2001 +From: Oleksiy Chernyavskyy +Date: Tue, 22 Aug 2017 03:27:36 +0300 +Subject: [PATCH] Fixed bug 1660 + +--- + lib/Xm/TextF.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/Xm/TextF.c b/lib/Xm/TextF.c +index 3323d2bd..f66076da 100644 +--- a/lib/Xm/TextF.c ++++ b/lib/Xm/TextF.c +@@ -1768,8 +1768,8 @@ PaintCursor(XmTextFieldWidget tf) + } + if (cursor_width > 0 && cursor_height > 0) + XCopyArea(XtDisplay(tf), tf->text.ibeam_off, XtWindow(tf), +- tf->text.save_gc, 0, 0, cursor_width, +- cursor_height, x, y); ++ tf->text.save_gc, src_x, 0, cursor_width, ++ cursor_height, x, y); + } + } + } +-- +2.13.5 + diff --git a/SPECS/motif.spec b/SPECS/motif.spec index a7bc461..4f61cd7 100644 --- a/SPECS/motif.spec +++ b/SPECS/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 10%{?dist} +Release: 12%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -36,6 +36,8 @@ Patch48: openmotif-2.3.1-rhbz_997241.patch Patch49: motif-2.3.5-motifzone_1654.patch Patch50: motif-2.3.4-motifzone_1564-88bdce1.patch Patch51: revert-of-motifzone_1565.patch +Patch52: motifzone_1660.patch +Patch53: motifzone_1612.patch Conflicts: lesstif <= 0.92.32-6 @@ -80,6 +82,8 @@ This package contains the static Motif libraries. %patch49 -p1 -b .motifzone_1654 %patch50 -p1 -b .motifzone_1564-88bdce1 %patch51 -p1 -b .revert-of-motifzone_1565 +%patch52 -p1 -b .motifzone_1660 +%patch53 -p1 -b .motifzone_1612 %build CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" \ @@ -134,6 +138,14 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Wed Dec 20 2017 Carlos Soriano - 2.3.4-12 +- Fix label size computed wrong within form. Fixes MotifZone#1612. + Resolves: rhbz#1519244 + +* Wed Dec 20 2017 Carlos Soriano - 2.3.4-11 +- Fix cursor color leaks. Fixes MotifZone#1660. + Resolves: rhbz#1508769 + * Sun Sep 17 2017 Carlos Soriano - 2.3.4-10 - Fix last commit that is actually MotifZone#1565 and removes that patch since it was causing more problems. Fixes MotifZone#1576.