[comp.windows.x] Xaw:Command.c fix

csvsj@garnet.berkeley.edu (Steve Jacobson) (09/30/88)

VERSION:
	X11 release 2

CLIENT MACHINE:
	Sun 3/50

CLIENT OPERATING SYSTEM:
	Sun OS 3.2

DISPLAY:
	Sun monochrome

SYNOPSIS:
	Command widget with highlightThickness of 0 flickers when pointer
	leaves window.

DESCRIPTION:
	When a command widget has a nonzero highlightThickness, there is a
	visible change when the pointer enters and leaves the widget window.
	When a command widget has a zero highlightThickness and the default
	widget translations are not overridden, there should be no visible
	change when the pointer enters and leaves the widget window. Currently,
	when the pointer leaves the widget window, the window is cleared
	before the contents are redrawn. When the before clear contents are
	identical to the redrawn contents as they are when there is no
	visible highlight, the widget "flickers".

REPEAT-BY:
	Create a command widget with a 0 highlightThickness and don't override
	the default translations. Move the pointer in and out of the widget
	window.

FIX:
	The first "if" statement in Redisplay() in Command.c reading:

	if ((!ComWhighlighted && ComWdisplayHighlighted) ||
       (!ComWset && ComWdisplaySet))

	should read:

if ((!ComWhighlighted && ComWdisplayHighlighted && ComWhighlightThickness) ||
       (!ComWset && ComWdisplaySet))