Opened 12 years ago

Closed 12 years ago

#5066 closed defect (fixed)

myth_system broken by MYTH_SYSTEM_DONT_BLOCK_PARENT

Reported by: pebender@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: 0.21-fixes
Severity: low Keywords:
Cc: Ticket locked: no

Description

With the addition of MYTH_SYSTEM_DONT_BLOCK_PARENT in changesets 16153 and 16155, myth_system does not all input events when MYTH_SYSTEM_DONT_BLOCK_PARENT is used.

You can see this by using LIRC to exit mythbrowser lauched by either MythBrowser? or MythNews?. Not only does mythbroswer process the Esc, but mythmainwindow does as well. This causes MythBrowser? or MythNews? to incorrectly exit when mythbroswer exits.

I believe that the problem is caused by when the qApp->processEvents() call is made in myth_system. Since it is not called after the child process exists, I believe there is a chance of a race condition that results in myth_system exiting and re-enabling input processing before the LIRC Esc has been discarded.

If qApp->processEvents() is called one last time after the child process exits, then the LIRC Esc event is flushed. This can be done by moving the location of the call.

The attached patch makes the change and fixes the problem for me.

Attachments (1)

mythtv-0.21-myth_system.patch (581 bytes) - added by pebender@… 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by pebender@…

comment:1 Changed 12 years ago by otto at kolsi dot fi

I have the same Esc problem with MythNews/MythBrowser? and this patch fixes it. By the way, could you next time use SVN DIFF when creating the patch.

This is the same issue as is in #4997

comment:2 Changed 12 years ago by paulh

(In [17277]) Fix a problem where exiting from MythBrowser? was also exiting from MythNews?.

Just changes the position of the call to qApp->processEvents() to make sure that all keypress events are flushed from the parent process's event queue before returning from myth_system() when called with the MYTH_SYSTEM_DONT_BLOCK_PARENT flag.

Refs #5066, #4997.

comment:3 Changed 12 years ago by paulh

Resolution: fixed
Status: newclosed

(In [17278]) Merge [17277] from trunk.

Fix a problem where exiting from MythBrowser? was also exiting from MythNews?.

Just changes the position of the call to qApp->processEvents() to make sure that all keypress events are flushed from the parent process's event queue before returning from myth_system() when called with the MYTH_SYSTEM_DONT_BLOCK_PARENT flag.

Fixes #5066, #4997.

Note: See TracTickets for help on using tickets.