Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 583977

Summary: Label size computed wrong within a Form
Product: Red Hat Enterprise Linux 5 Reporter: Olivier Fourdan <ofourdan>
Component: openmotifAssignee: Thomas Woerner <twoerner>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: cward, kem, pknirsch, psplicha, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 583984 869782 980577 (view as bug list) Environment:
Last Closed: 2011-11-14 09:29:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 583984, 980577    
Attachments:
Description Flags
Reproducer program
none
Possible patch none

Description Olivier Fourdan 2010-04-20 12:42:17 UTC
Created attachment 407807 [details]
Reproducer program

Description of problem:

Consider the attached reproducer program.

If the label text is modified while the window is smaller than the actual label width, the resulting size may be computed wrong and the label text truncated.

Version-Release number of selected component (if applicable):

openmotif-2.3.1

How reproducible:

Always

Steps to Reproduce:
1. Save and compile the attached reproducer program
   $ tar xjf simple_label.tar.bz2
   $ cd simple_label
   $ make
   $ ./simple_label
2. Click on "Modify Label"
3. Reduce the width of the window
4. Click again on "Modify Label"
5. Enlarge the window
  
Actual results:

The label is truncated

Expected results:

The label is seen in its entirety

Additional info:

It seems the size set in GeometryManager() from Form.c based on the XmFormConstraint preferred_width field is not updated when the label is changed and still contains on previous label length.

Curent openmotif cvs still suffer the same problem.

Comment 1 Olivier Fourdan 2010-04-27 10:04:58 UTC
Created attachment 409424 [details]
Possible patch

This patch fixes the issue for the reproducer.

Also, tested not to break the fix for upstream bug 1298 [1], as tested with the reproducer in [2].

However, due to the fairly complex nature of XmForm, this patch needs more testing.

[1] http://bugs.motifzone.net/show_bug.cgi?id=1298
[2] http://bugs.motifzone.net/showattachment.cgi?attach_id=68

Comment 3 RHEL Program Management 2010-08-09 18:32:14 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 10 errata-xmlrpc 2011-11-14 09:29:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1451.html