~agateau/unity-2d/show-launcher-from-home-button

« back to all changes in this revision

Viewing changes to launcher/UnityApplications/launchermenu.cpp

[launcher] Do not hide launcher while a menu is visible

Adds two signals to LauncherContextualMenu to let QML LauncherList know when a menu is shown or hidden. I first tried to use the aboutToShow() and aboutToHide() signals, but aboutToShow() is not emitted due to the way we use QMenu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
{
246
246
    m_launcherItem = launcherItem;
247
247
}
 
248
 
 
249
void
 
250
LauncherContextualMenu::showEvent(QShowEvent* event)
 
251
{
 
252
    QMenu::showEvent(event);
 
253
    visibleChanged(true);
 
254
}
 
255
 
 
256
void
 
257
LauncherContextualMenu::hideEvent(QHideEvent* event)
 
258
{
 
259
    QMenu::hideEvent(event);
 
260
    visibleChanged(false);
 
261
}