Bug 118185 - Keyboard accelerator underlines are not hidden correctly when ALT key is released with libreoffice-gtk
Summary: Keyboard accelerator underlines are not hidden correctly when ALT key is rele...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: ARM Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 98529
  Show dependency treegraph
 
Reported: 2018-06-15 20:42 UTC by Simon Long
Modified: 2018-06-16 20:10 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Long 2018-06-15 20:42:03 UTC
Description:
A couple of years ago I produced a patch which enabled GTK-2 and -3 accelerator underline autohide when using libreoffice-gtk. When accelerator autohide is enabled in the GTK theme, the underscores in menus etc should only be shown while the ALT key is held down; they should be hidden the rest of the time. This worked well in LO 4.

This behaviour has not been correctly ported to LO 5 - on the main menu bar at the top of an application window, the accelerator underlines are initially hidden (which is correct), and they are shown when the ALT key is pressed (which is also correct), but they remain visible when the ALT key is released (which is not correct). They are only hidden again when a menu is closed by pressing ESC. If ALT is pressed and released without an accelerator key being pressed as well, the underlines remain on the menu and cannot be removed.

The behaviour is purely an issue with the display of the underlines; the accelerator keys themselves work as intended; i.e. are only effective while the ALT key is held.

Steps to Reproduce:
1.Ensure libreoffice-gtk theme is installed
2.Ensure auto-hiding of accelerators is enabled in GTK - system dependent, but on LXDE requires "iGtk/AutoMnemonics=1" and "iGtk/EnableMnemonics=1" to be set in the [GTK] section of the lxsettings daemon
3.Launch LibreOffice Calc
4.Observe that no underlines are visible on top menu bar.
5.Press ALT - observe that underlines appear on top menu bar.
6.Release ALT - observer that underlines remain on top menu bar.

Actual Results:
Underlines remain visible on top menu bar after ALT has been pressed and released

Expected Results:
Underlines should appear when ALT is pressed, but should disappear again when ALT is released.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 V Stuart Foote 2018-06-16 04:10:32 UTC
(In reply to Simon Long from comment #0)
> Description:
> A couple of years ago I produced a patch which enabled GTK-2 and -3
> accelerator underline autohide when using libreoffice-gtk. When accelerator
> autohide is enabled in the GTK theme, the underscores in menus etc should
> only be shown while the ALT key is held down; they should be hidden the rest
> of the time. This worked well in LO 4.
> 
> This behaviour has not been correctly ported to LO 5 - on the main menu bar
> at the top of an application window, the accelerator underlines are
> initially hidden (which is correct), and they are shown when the ALT key is
> pressed (which is also correct), but they remain visible when the ALT key is
> released (which is not correct). They are only hidden again when a menu is
> closed by pressing ESC. If ALT is pressed and released without an
> accelerator key being pressed as well, the underlines remain on the menu and
> cannot be removed.
> ...

OK, that was bug 92630 and https://gerrit.libreoffice.org/#/c/16868/ rebased to master by Samuel M. https://gerrit.libreoffice.org/#/c/16883/ which was only implemented at 5.1.0

Fair bit of work since then, any better with a 6.1 release or current master/6.2?

As with the wontfix handling of bug 97260 -- this mishandling of the visibility with GTK+ themes should be corrected for GTK+ normalcy. But need to also recognize lingering issues like bug 54169 continue to affect non-GTK OS/DE
Comment 2 Alex ARNAUD 2018-06-16 13:04:50 UTC
I couldn't reproduce the issue on Debian Stretch with GTK 3.22.11 and LibreOffice 6.0.5. 

What is your distribution and GTK 3 version ?

Best regards,
ALex.
Comment 3 Jean-Baptiste Faure 2018-06-16 19:20:38 UTC
Not reproducible under Ubuntu (Unity) 16.04 x86-64 with LibreOffice 6.0.4 from Ubuntu PPA and using GTK3.

Best regards. JBF
Comment 4 Simon Long 2018-06-16 19:28:07 UTC
(In reply to Alex ARNAUD from comment #2)
> I couldn't reproduce the issue on Debian Stretch with GTK 3.22.11 and
> LibreOffice 6.0.5. 
> 
> What is your distribution and GTK 3 version ?
> 
> Best regards,
> ALex.

Debian (Raspbian) Stretch, with GTK 3.22.11.

I'll try downloading LO 6 and see if it's fixed in there.
Comment 5 Simon Long 2018-06-16 20:02:06 UTC
Just tried LibreOffice 6.0.5.1 on Stretch and GTK 3.22.11 - that does indeed work fine and does not have the same bug. Looks like it is only LibreOffice 5 which is affected.
Comment 6 Alex ARNAUD 2018-06-16 20:10:19 UTC
(In reply to Simon Long from comment #5)
> Just tried LibreOffice 6.0.5.1 on Stretch and GTK 3.22.11 - that does indeed
> work fine and does not have the same bug. Looks like it is only LibreOffice
> 5 which is affected.

Thanks for the confirmation. I'm moving the status to resolved as it now works correctly on latest stable version.

Best regards,
Alex.