Bug 19198

Summary: Xaw Text widget doesn't handle XawtextScrollWhenNeeded properly
Product: [Retired] Red Hat Linux Reporter: Omnifarious <hopper>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-11-14 17:47:17 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:

Description Omnifarious 2000-10-16 19:37:21 UTC
When I compiled SQSH 1.7 on my computer to use the Xaw library, the
scrollbars wouldn't appear on the X output window when I executed a big
query.
I looked at the code, and it was using XawtextScrollWhenNeeded value for
the XtNscrollVertical property.  When I changed it to use
XawtestScrollAlways, the scrollbars appear.  This also appeared to be a
problem (though I didn't look at the source) with xless, and (I would
presume) other Xaw applications.

Source that causes problem:
	w_text = XtVaCreateManagedWidget( "text", asciiTextWidgetClass, w_form,
		XtNdisplayCaret,      FALSE,
		XtNtop,               XtChainTop,
		XtNvertDistance,      5,
		XtNhorizDistance,     5,
		XtNleft,              XtChainLeft,
		XtNright,             XtChainRight,
		XtNwidth,             200,
		XtNheight,            100,
		XtNscrollHorizontal,  XawtextScrollWhenNeeded,
		XtNscrollVertical,    XawtextScrollWhenNeeded,
		XtNeditType,          XawtextAppend,
		NULL );
Source that works around problem:
	w_text = XtVaCreateManagedWidget( "text", asciiTextWidgetClass, w_form,
		XtNdisplayCaret,      FALSE,
		XtNtop,               XtChainTop,
		XtNvertDistance,      5,
		XtNhorizDistance,     5,
		XtNleft,              XtChainLeft,
		XtNright,             XtChainRight,
		XtNwidth,             200,
		XtNheight,            100,
		XtNscrollHorizontal,  XawtextScrollAlways,
		XtNscrollVertical,    XawtextScrollAlways,
		XtNeditType,          XawtextAppend,
		NULL );

Comment 1 Omnifarious 2000-10-16 19:45:22 UTC
I switched the application to use the Xaw3d library, and that library handles 
XawtextScrollWhenNeeded properly.


Comment 2 Omnifarious 2000-11-14 17:47:11 UTC
The Xaw3d scrollbars seem to be getting the wrong information about ranges.
Moving to the scrollbar to the bottom does not move to the end of the range.
Using the left and right mouse buttons inside the scrollbar to move up and down
can show the entire scrolled area.


Comment 3 Mike A. Harris 2001-07-16 07:54:48 UTC
This bug should be submitted upstream to XFree86 directly as it is older
code which is not as widely used today and as such is likely to get fixed
sooner by the XFree86 team because it is not high priority.

Please submit an email bug report to xfree86