Opened 3 years ago

Closed 2 years ago

Last modified 18 months ago

#12857 closed Bug Report - General (Abandoned)

OS X - mythfrontend, mythtv-setup become unresponsive to keyboard

Reported by: ctreleaven@… Owned by: Peter Bennett
Priority: minor Milestone: 0.28.2
Component: Ports - OSX Version: v29.0
Severity: medium Keywords:
Cc: ctreleaven@… Ticket locked: no

Description

After using a certain on-screen widget, in either mythfrontend or mythtv-setup, the program no longer responds to keyboard input (other than by beeping).

Occurs with both the bundled apps produced by osx-packager-blah.pl and unbundbled apps produced with MacPorts?.

Steps to reproduce:

1) in mythfrontend, navigate to Settings --> General.

2) note that on the last page of this group of settings (see screen capture), using the arrow keys one can highlight each field/control on the page except "Customize exit menu options:".

3) Use the mouse to click that control; changing the selected value or leaving it at the previous value makes no difference.

4) Note that the arrow keys still respond on this page. After selecting Finish on this page, Myth will return to the Settings menu page.

5) On the Settings menu page, Myth will no longer respond to keystrokes (arrow keys or escape) and will beep after each key press. Myth appears to be hung.

6) Clicking anywhere on the screen will restore keyboard operation of Myth.

Note that any screen that has the same type of widget (drop-down list of values) will trigger the issue. Eg Settings --> Video --> General or Settings --> Video --> Playback for other instances.

Can reproduce with Terra, MythCenter? and MythBuntu? themes.

The bundled app is using Qt 5.5.1 and the MacPorts? version is using Qt 5.6.1 This issue did not occur with 0.27 and Qt4.

Please let me know if you'd like other information or logs.

Attachments (5)

versionInfo.txt (1.5 KB) - added by ctreleaven@… 3 years ago.
mfe_settings_general_2016Aug16.png (726.3 KB) - added by ctreleaven@… 3 years ago.
screen capture with offending widget highlighted
patch-mythwidgets_osx_focus.diff (356 bytes) - added by ctreleaven@… 3 years ago.
mfe29_version.txt (759 bytes) - added by ctreleaven@… 2 years ago.
29 version info
Settings_General_Shutdown.jpg (144.7 KB) - added by ctreleaven@… 2 years ago.
Controls that can no longer be activated/selected

Download all attachments as: .zip

Change History (19)

Changed 3 years ago by ctreleaven@…

Attachment: versionInfo.txt added

Changed 3 years ago by ctreleaven@…

screen capture with offending widget highlighted

comment:1 Changed 3 years ago by ctreleaven@…

Assuming I'm right that the widget at issue is a QComboBox, the following bug report appears to be related:

"We changed QComboBox's focus policy in Qt 5 on Mac to make it feel more native. An easy workaround, until we find a proper solution, is to setFocusPolicy(Qt::WheelFocus?) on the combobox before returning it from createEditor()."

https://bugreports.qt.io/browse/QTBUG-29398

OTOH, I know know nothing about Qt and could be entirely wrong.

comment:2 Changed 3 years ago by ctreleaven@…

Turns out it is a trivial patch to libs/libmyth/mythwidgets.cpp

Qt5 changed the focus policy for the QComboBox on OS X. Adding

setFocusPolicy(Qt::WheelFocus);

makes it behave as it did on Qt4.

I've added an #ifdef so this is only changed on OS X. I think it is actually no-harm on other platforms but don't have a way to test.

Changed 3 years ago by ctreleaven@…

comment:3 Changed 3 years ago by Stuart Auchterlonie

Milestone: unknown0.28.1

comment:4 Changed 3 years ago by Stuart Auchterlonie

Milestone: 0.28.10.28.2

Moving remaining open 0.28.1 tickets to 0.28.2

comment:5 Changed 2 years ago by ctreleaven@…

After initial testing with 29 (Steppes 29 theme), the issue is _more_ widespread than before. After initially entering almost any setup screen, the arrow keys and tab fail to function. Clicking somewhere in the window causes a control to become active and then arrow/tab work normally.

I'd like to do more testing but time may be very tight in the next couple of months (just sold a house).

comment:6 Changed 2 years ago by Peter Bennett

Component: Qt5 issuesPorts - OSX
Owner: set to Peter Bennett
Status: newassigned
Version: 0.28.0v29.0

comment:7 Changed 2 years ago by Peter Bennett

Status: assignedinfoneeded

Note that tabs are not used any more in setup. You can use forward and back arrows, and enter. In lists and spin boxes you can use left, right, page up, page down.

Does this problem happen in frontend setup or mythtv-setup or both?

The setup now uses the MythTV themes, so it should behave the same as all other pages. Do any other pages in MythTV have this problem of losing focus? In setup when you lose focus, is it after any specific action?

I do not have an OS/X system to test on, but if you can narrow it down, maybe I can add something to the code that will resolve this.

comment:8 Changed 2 years ago by ctreleaven@…

The steps to reproduce the originally reported problem have changed slightly on 29.0:

1) in mythfrontend, navigate to Setup --> General.

2) the order of the settings panels is slightly different in 29. Select "Shutdown/Reboot? Settings". Before making any changes, note that up/down arrows work to move focus among the four on-screen widgets. Navigate to "Customize exit menu options". Bring up the list of choices by pressing Space or Return. If I change the value to "Show quit", I am no longer able to arrow to the lower two boxes on the screen (text boxes for Shutdown and Halt commands). Changing "Customize exit menu options" to any value _other_ than "Default" or "Show quit" allows me to again arrow to the lower two commands. Weird.

3) Again weirdly, AFAICT, the "Customize exit menu options" widget cannot be clicked with a mouse. This is a change from 0.28 behaviour.

4) [No longer relevant due to new design.]

5) Different from 0.28, I _can_ use arrow keys once back to the main setting menu. However, when I select "General" again, then the arrow keys become unresponsive. For each press on an arrow key, there is approximately a 2 second pause and then a beep sound. Appears to me that Qt is searching for a widget to pass the keystroke event to and then beeping when none can be located. Note that this pause is consistent with 0.28 behaviour. I failed to describe it before.

6) Clicking anywhere on the screen will restore keyboard operation of Myth. I presume that clicking brings the screen of controls "into focus" (or whatever is the right term in Qt) and thus keystroke events are being passed to the correct object.

Note that the patch in comment 3 _is_ applied. It may be a few days before I can test without it.

Feel free to contact me via email if you wish more background or details.

Changed 2 years ago by ctreleaven@…

Attachment: mfe29_version.txt added

29 version info

Changed 2 years ago by ctreleaven@…

Controls that can no longer be activated/selected

comment:9 in reply to:  8 ; Changed 2 years ago by Peter Bennett

Replying to ctreleaven@…:

2) the order of the settings panels is slightly different in 29. Select "Shutdown/Reboot? Settings". Before making any changes, note that up/down arrows work to move focus among the four on-screen widgets. Navigate to "Customize exit menu options". Bring up the list of choices by pressing Space or Return. If I change the value to "Show quit", I am no longer able to arrow to the lower two boxes on the screen (text boxes for Shutdown and Halt commands). Changing "Customize exit menu options" to any value _other_ than "Default" or "Show quit" allows me to again arrow to the lower two commands. Weird.

This is a feature. If you are only showing "quit" in the menu you do not need to provide a shutdown command. You only need that if "shutdown" is in the menu. Similar for reboot.

3) Again weirdly, AFAICT, the "Customize exit menu options" widget cannot be clicked with a mouse. This is a change from 0.28 behaviour.

Since this now uses MythUI, mouse support is not available. It works like other myth screens (Some widgets may work with a mouse, if they do this is accidental).

Note that the patch in comment 3 _is_ applied. It may be a few days before I can test without it.

I think that is irrelevant. Those widgets are no longer being used.

So the real problem here is that it loses focus after exiting from a setup page. I do not have an OS X system to test with, but I will look and see if there is something that can be done to make sure focus is not lost.

comment:10 in reply to:  9 Changed 2 years ago by ctreleaven@…

Replying to pbennett:

Replying to ctreleaven@…: ... So the real problem here is that it loses focus after exiting from a setup page. I do not have an OS X system to test with, but I will look and see if there is something that can be done to make sure focus is not lost.

I don't think there is any logging available now to help isolate the problem. Is it possible to add something, even temporarily?

comment:11 Changed 2 years ago by Peter Bennett

When you left arrow or escape from a setting, if you have changed something it will pop up a dialog asking you whether you want to save and exit, save without exiting or cancel.

Do you see that dialog?

Does the loss of focus happen after that dialog?

Does the loss of focus happen if you did not change anything and therefore did not get that dialog?

comment:12 Changed 2 years ago by Peter Bennett

Resolution: Abandoned
Status: infoneededclosed

comment:13 Changed 2 years ago by ctreleaven@…

Please re-open, I've been tied up with a house sale so I haven't had any Myth time for quite a while. The sale is now closed and I'm hoping to get back to normal, soon. Also, I've had a preliminary report of problems under Apple's newest OSX/macOS version. Details if/when I can confirm.

comment:14 Changed 18 months ago by Peter Bennett

Owner: changed from Peter Bennett to Peter Bennett
Note: See TracTickets for help on using tickets.