Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#5417 closed defect (invalid)

guidegrid.cpp filters keypresses to aggressively

Reported by: johan@… Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords: EPG guide hung focus remote
Cc: Ticket locked: no

Description

The keypress filtering in GuideGrid:keyPressEvent() fails when mythfrontend does not have focus. This manifests that cursor keys move one grid in the EPG grid, and then refuse to move any further. Interestingly, the original author of this code must have had an inkling of something like this, given this comment:

// keyDown limits keyrepeats to prevent continued scrolling
// after key is released. Note: Qt's keycompress should handle
// this but will fail with fast key strokes and keyboard repeat
// enabled. Keys will not be marked as autorepeat and flood buffer.
// setFocusPolicy(QWidget::ClickFocus) in constructor is important
// or keyRelease events will not be received after a refocus.

..and the fact that the code always allows ESC to back out of the EPG. Googling for this shows several people having reported this problem.

I'm not sure what prompted the original coder to go to all that trouble, but disabling the keypress limiting code makes the hung EPG problem go away. Just comment out this code in GuideGrid:keyPressEvent:

    if (actions.size() > 0 && keyDown && actions[0] != "ESCAPE")
        return; //check for Escape in case something goes wrong
                //with KeyRelease events, shouldn't happen.

To reproduce this problem, you'll need to run mythfrontend without the X focus, controlling it with a remote. Using irxevent or the internal LIRC code makes no difference.

Change History (3)

comment:1 Changed 12 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

comment:2 Changed 11 years ago by danielk

Resolution: invalid
Status: assignedclosed

mythfrontend should have foxus when getting keypresses.

comment:3 Changed 11 years ago by johan@…

In that case, you need to re-implement the remote control handling, which currently simulates keypresses. I think it is unreasonable to require that an application that allows 99% operation without X focus, operating entirely with a remote control (ffs, you have a virtual keyboard, man!), fails in such a central part like the program guide. Especially since it's an easy fix.

Note: See TracTickets for help on using tickets.