On my 0.21-release-fixes codebase, MythWelcome would pause for a long time (2-3 seconds) after I pressed the “MENU” key before making the menu pop up. This was because a call to “mythshutdown –status” was taking several seconds to return, and MythWelcome waited for the return value of that message before drawing the menu (It wanted to know if it should draw a “unlock” or a “lock” button.)
I suspect that mythshutdown –status isn’t supposed to take this long, but I’ve coded up a quick hack in mythWelcome that fixes the UI pause problem.
Because MythWelcome periodically checks the status of the system (in the updateStatusMessage function), I just cached this status in a global variable. When the “Menu” event is processed, it checks the cached status variable and draws the menu immediately, (only calling “mythshutdown –status” if the status has not already been cached.)
Obviously, if somebody changes the lock status of the machine between the last call to updateStatusMessage and the “Menu” button being pressed, the menu will have the wrong button on it. (I am willing to live with this.)
I am not suggesting that the attached patch be integrated with the MythTv codebase (my understanding is that the code in Trunk does not suffer from the problem I am trying to solve), but if you are running 0.21 and want to solve the problem I’ve described, the following patch (to programs/mythwelcome/welcomedialog.cpp) will do it.