Prevent tab icon from blinking upon tab gaining focus (#8609)
Looks like recent regression: 1. Every time the tab gains focus (e.g., upon tab switching) we trigger `TaskbarProgressChanged` 2. This call results in `HideIcon` call 3. This call resets the value of Icon even if hide=false 4. This triggers reload of the image resulting in blinking
This commit is contained in:
parent
4f46129cb4
commit
d37df8ab05
|
@ -219,17 +219,19 @@ namespace winrt::TerminalApp::implementation
|
|||
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
if (hide)
|
||||
if (tab->_iconHidden != hide)
|
||||
{
|
||||
Icon({});
|
||||
TabViewItem().IconSource(IconPathConverter::IconSourceMUX({}));
|
||||
tab->_iconHidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Icon(_lastIconPath);
|
||||
TabViewItem().IconSource(IconPathConverter::IconSourceMUX(_lastIconPath));
|
||||
tab->_iconHidden = false;
|
||||
if (hide)
|
||||
{
|
||||
Icon({});
|
||||
TabViewItem().IconSource(IconPathConverter::IconSourceMUX({}));
|
||||
}
|
||||
else
|
||||
{
|
||||
Icon(_lastIconPath);
|
||||
TabViewItem().IconSource(IconPathConverter::IconSourceMUX(_lastIconPath));
|
||||
}
|
||||
tab->_iconHidden = hide;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue