[mythtv-commits] Ticket #5417: guidegrid.cpp filters keypresses to aggressively
MythTV
mythtv at cvs.mythtv.org
Sat Jun 7 14:56:53 UTC 2008
#5417: guidegrid.cpp filters keypresses to aggressively
-------------------------------+--------------------------------------------
Reporter: johan at linkdata.se | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium | Mlocked: 0
-------------------------------+--------------------------------------------
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.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/5417>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list