Skip to content

Commit

Permalink
Always show the bell indicator when BEL is emitted (#9212)
Browse files Browse the repository at this point in the history
Regardless of whether the bellstyle is set to visual,
show the bell indicator in the tab header

(cherry picked from commit d12a71c)
  • Loading branch information
PankajBhojwani authored and DHowett committed Feb 23, 2021
1 parent ba534aa commit da5ec7b
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/cascadia/TerminalApp/TerminalTab.cpp
Expand Up @@ -709,25 +709,26 @@ namespace winrt::TerminalApp::implementation
}
});

// Add a PaneRaiseVisualBell event handler to the Pane. When the pane emits this event,
// we need to bubble it all the way to app host. In this part of the chain we bubble it
// from the hosting tab to the page.
// Add a PaneRaiseBell event handler to the Pane
pane->PaneRaiseBell([weakThis](auto&& /*s*/, auto&& visual) {
if (auto tab{ weakThis.get() })
{
if (visual)
{
// If visual is set, we need to bubble this event all the way to app host to flash the taskbar
// In this part of the chain we bubble it from the hosting tab to the page
tab->_TabRaiseVisualBellHandlers();
}

tab->ShowBellIndicator(true);
// Show the bell indicator in the tab header
tab->ShowBellIndicator(true);

// If this tab is focused, activate the bell indicator timer, which will
// remove the bell indicator once it fires
// (otherwise, the indicator is removed when the tab gets focus)
if (tab->_focusState != WUX::FocusState::Unfocused)
{
tab->ActivateBellIndicatorTimer();
}
// If this tab is focused, activate the bell indicator timer, which will
// remove the bell indicator once it fires
// (otherwise, the indicator is removed when the tab gets focus)
if (tab->_focusState != WUX::FocusState::Unfocused)
{
tab->ActivateBellIndicatorTimer();
}
}
});
Expand Down

0 comments on commit da5ec7b

Please sign in to comment.