CUserMenu: using native callback to ensure paint for info clock after hide of this menu window

menu->hide() handler comes too early, nice to see if clock is transparent.
This commit is contained in:
2015-11-18 19:53:30 +01:00
parent 1446f15d4b
commit 42102d432d

View File

@@ -163,15 +163,21 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
if (menu == NULL) if (menu == NULL)
return true; return true;
/*
using native callback to ensure paint for info clock after hide of this menu window
menu->hide() handler comes too early, nice to see if clock is transparent.
*/
menu->OnAfterHide.connect(sigc::mem_fun(CInfoClock::getInstance(), &CInfoClock::block));
if (button < COL_BUTTONMAX) if (button < COL_BUTTONMAX)
menu->setSelected(user_menu[button].selected); menu->setSelected(user_menu[button].selected);
//show cancel button if configured //show cancel button if configured
if (g_settings.personalize[SNeutrinoSettings::P_UMENU_SHOW_CANCEL]) if (g_settings.personalize[SNeutrinoSettings::P_UMENU_SHOW_CANCEL])
menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL);
else else
menu->addItem(GenericMenuSeparator); menu->addItem(GenericMenuSeparator);
bool _mode_ts = CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_ts; bool _mode_ts = CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_ts;
std::string itemstr_last("1"); std::string itemstr_last("1");
@@ -454,7 +460,6 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
extern CInfoClock *InfoClock; extern CInfoClock *InfoClock;
InfoClock->enableInfoClock(false); InfoClock->enableInfoClock(false);
// show menu if there are more than 2 items only // show menu if there are more than 2 items only
// otherwise, we start the item directly (must be the last one) // otherwise, we start the item directly (must be the last one)
if (menu_items > 1 ) if (menu_items > 1 )