Bug Description

[Impact]
Keyboard navigation of menus in applications built against Motif 2.3.4 is broken.
This is a regression for applications that were previously built against Lesstif but have been built against Motif in Saucy, see the transition bug LP: #1222747. The fix is an updated patch for upstream bug #1565 [1], provided by upstream.

[Test Case]
Install and run xball (or any other Motif application with a menu bar).
Click on 'File' in the menu bar (or press Alt-F).
Now press Left Arrow or Right Arrow and the highlight should move left and right through the horizontal menu options (File, Actions, Options and Help).
Now press Up Arrow, Down Arrow or Enter and nothing happens, the expect behaviour is that the highlight should move through the vertical menu options and the option be actioned.

[Regression Potential]
This patch affects the operation of ComboBox, PopupMenu, OptionMenu and DropDownList widgets in applications built against Motif.
The behaviour of the original bug #1565 and previous versions of the patch to fix it were different on different display managers / window managers. I have successfully tested the current patch in Unity, MWM, XFCE, FluxBox, LXDE, GNOME, KDE and Openbox.

In this SRU, I would like to include fixes for two additional bugs:
- the undefined use of sprintf in lib/Xm/XmRenderT.c where the source and destination buffers overlap (upstream bug #1628 [2])
- an array bounds error in lib/Xm/DataF.c where _XmDataFieldIsWSpace() is called with num_entries = 3 (upstream bug #1629 [3])
I believe the fixes for these are trivial and the regression potential for them is low.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.