Bug 153614

Summary: kf5: Missing focus frame when moving focus to listboxes using keyboard
Product: LibreOffice Reporter: Michael Weghorn <m.weghorn>
Component: graphics stackAssignee: Michael Weghorn <m.weghorn>
Status: RESOLVED FIXED    
Severity: normal CC: m.weghorn, rafael.palma.lima
Priority: medium    
Version: 7.6.0.0 alpha0+   
Hardware: All   
OS: Linux (All)   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=153520
Whiteboard: target:7.6.0 target:7.5.2
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 102495    
Attachments: Screencast demonstrating the issue

Description Michael Weghorn 2023-02-14 16:20:00 UTC
Created attachment 185367 [details]
Screencast demonstrating the issue

When moving focus to a listbox using the keyboard, no focus/highlight frame is drawn for the listbox when using the kf5 VCL plugin, at least not with the KDE Breeze style

Steps to reproduce

1) Start LO Writer with the kf5 VCL plugin
2) Press Alt+F12 to open the options dialog, navigate to "LibreOffic Dev" -> "User Data"
3) tab through the dialog, in particular through the 2 listboxes at the bottom ("OpenPGP signing key", "OpenPGP encryption key").

Actual behavior:

A focus frame is drawn for the edit boxes (line edits), but not for the listboxes when they get focus. Therefore it's not visible where focus currently is.

Expected behavior: The light blue focus frame should be drawn for the listboxes as well.


Further notes:

* A light blue frame is drawn when hovering over the control using the mouse instead or moving there using the mouse (s.a. tdf#153520 and the screenast there).
* A light blue frame is drawn for list boxes in other Qt/KDE applications (e.g. Kate), so this is LibreOffice-specific.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ce3d8f7e082afbc4a3139c723cb4533579523fe2
CPU threads: 12; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

Tested on Debian testing with

    ii breeze         4:5.26.90-1  amd64        Default Plasma theme (Metapackage)
Comment 1 Michael Weghorn 2023-02-14 16:25:54 UTC
Pending Gerrit change:
https://gerrit.libreoffice.org/c/core/+/147019
Comment 2 Rafael Lima 2023-02-15 02:54:10 UTC
I can confirm the issue in

Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: 50(Build:3)
CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.5.0~rc3-0ubuntu0.22.10.1~lo1
Calc: threaded

Indeed, using tab to navigate the dialog won't draw the frame around listboxes.
Comment 3 Commit Notification 2023-02-20 06:12:05 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b845ba1900387b8ea44a27a1f7d045ca0091adf2

tdf#153614 qt: Set keyboard focus state when focused, too

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2023-02-20 17:22:26 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/700940765a7641f0d0535223470aa3a66d13a892

tdf#153614 qt: Set keyboard focus state when focused, too

It will be available in 7.5.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.