Skip to content

Commit

Permalink
Removed unnecessary ShowTabsFullscreenChanged event
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekJosh committed Nov 16, 2024
1 parent 6b5b5f2 commit c3dd1f8
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 23 deletions.
5 changes: 1 addition & 4 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3582,7 +3582,6 @@ namespace winrt::TerminalApp::implementation
AlwaysOnTopChanged.raise(*this, nullptr);

_showTabsFullscreen = _settings.GlobalSettings().ShowTabsFullscreen();
ShowTabsFullscreenChanged.raise(*this, nullptr);

// Settings AllowDependentAnimations will affect whether animations are
// enabled application-wide, so we don't need to check it each time we
Expand Down Expand Up @@ -4021,8 +4020,7 @@ namespace winrt::TerminalApp::implementation
}

// Method Description:
// - Updates the visibility of the tab row when in fullscreen state and
// raises the ShowTabsFullscreenChanged event.
// - Updates the visibility of the tab row when in fullscreen state.
void TerminalPage::SetShowTabsFullscreen(bool newShowTabsFullscreen)
{
if (_showTabsFullscreen == newShowTabsFullscreen)
Expand All @@ -4038,7 +4036,6 @@ namespace winrt::TerminalApp::implementation
{
_UpdateTabView();
}
ShowTabsFullscreenChanged.raise(*this, nullptr);
}

void TerminalPage::SetFullscreen(bool newFullscreen)
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalApp/TerminalPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ namespace winrt::TerminalApp::implementation
til::typed_event<IInspectable, IInspectable> FullscreenChanged;
til::typed_event<IInspectable, IInspectable> ChangeMaximizeRequested;
til::typed_event<IInspectable, IInspectable> AlwaysOnTopChanged;
til::typed_event<IInspectable, IInspectable> ShowTabsFullscreenChanged;
til::typed_event<IInspectable, IInspectable> RaiseVisualBell;
til::typed_event<IInspectable, IInspectable> SetTaskbarProgress;
til::typed_event<IInspectable, IInspectable> Initialized;
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalApp/TerminalPage.idl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ namespace TerminalApp
event Windows.Foundation.TypedEventHandler<Object, Object> FocusModeChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> FullscreenChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> AlwaysOnTopChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> ShowTabsFullscreenChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> Initialized;
event Windows.Foundation.TypedEventHandler<Object, Object> SetTaskbarProgress;
event Windows.Foundation.TypedEventHandler<Object, Object> IdentifyWindowsRequested;
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalApp/TerminalWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ namespace winrt::TerminalApp::implementation
FORWARDED_TYPED_EVENT(FullscreenChanged, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable, _root, FullscreenChanged);
FORWARDED_TYPED_EVENT(ChangeMaximizeRequested, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable, _root, ChangeMaximizeRequested);
FORWARDED_TYPED_EVENT(AlwaysOnTopChanged, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable, _root, AlwaysOnTopChanged);
FORWARDED_TYPED_EVENT(ShowTabsFullscreenChanged, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable, _root, ShowTabsFullscreenChanged);
FORWARDED_TYPED_EVENT(RaiseVisualBell, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable, _root, RaiseVisualBell);
FORWARDED_TYPED_EVENT(SetTaskbarProgress, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable, _root, SetTaskbarProgress);
FORWARDED_TYPED_EVENT(IdentifyWindowsRequested, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, IdentifyWindowsRequested);
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalApp/TerminalWindow.idl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ namespace TerminalApp
event Windows.Foundation.TypedEventHandler<Object, Object> FullscreenChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> ChangeMaximizeRequested;
event Windows.Foundation.TypedEventHandler<Object, Object> AlwaysOnTopChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> ShowTabsFullscreenChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> RaiseVisualBell;
event Windows.Foundation.TypedEventHandler<Object, Object> SetTaskbarProgress;
event Windows.Foundation.TypedEventHandler<Object, Object> IdentifyWindowsRequested;
Expand Down
12 changes: 0 additions & 12 deletions src/cascadia/WindowsTerminal/AppHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ void AppHost::Initialize()
_revokers.FullscreenChanged = _windowLogic.FullscreenChanged(winrt::auto_revoke, { this, &AppHost::_FullscreenChanged });
_revokers.FocusModeChanged = _windowLogic.FocusModeChanged(winrt::auto_revoke, { this, &AppHost::_FocusModeChanged });
_revokers.AlwaysOnTopChanged = _windowLogic.AlwaysOnTopChanged(winrt::auto_revoke, { this, &AppHost::_AlwaysOnTopChanged });
_revokers.ShowTabsFullscreenChanged = _windowLogic.ShowTabsFullscreenChanged(winrt::auto_revoke, { this, &AppHost::_ShowTabsFullscreenChanged });
_revokers.RaiseVisualBell = _windowLogic.RaiseVisualBell(winrt::auto_revoke, { this, &AppHost::_RaiseVisualBell });
_revokers.SystemMenuChangeRequested = _windowLogic.SystemMenuChangeRequested(winrt::auto_revoke, { this, &AppHost::_SystemMenuChangeRequested });
_revokers.ChangeMaximizeRequested = _windowLogic.ChangeMaximizeRequested(winrt::auto_revoke, { this, &AppHost::_ChangeMaximizeRequested });
Expand Down Expand Up @@ -851,17 +850,6 @@ void AppHost::_AlwaysOnTopChanged(const winrt::Windows::Foundation::IInspectable
_window->SetAlwaysOnTop(_windowLogic.AlwaysOnTop());
}

void AppHost::_ShowTabsFullscreenChanged(const winrt::Windows::Foundation::IInspectable&,
const winrt::Windows::Foundation::IInspectable&)
{
if (_window == nullptr)
{
return;
}

_window->SetShowTabsFullscreen(_windowLogic.ShowTabsFullscreen());
}

// Method Description
// - Called when the app wants to flash the taskbar, indicating to the user that
// something needs their attention
Expand Down
3 changes: 0 additions & 3 deletions src/cascadia/WindowsTerminal/AppHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ class AppHost : public std::enable_shared_from_this<AppHost>
const winrt::Windows::Foundation::IInspectable& arg);
void _AlwaysOnTopChanged(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Windows::Foundation::IInspectable& arg);
void _ShowTabsFullscreenChanged(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Windows::Foundation::IInspectable& arg);
safe_void_coroutine _WindowInitializedHandler(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Windows::Foundation::IInspectable& arg);

Expand Down Expand Up @@ -190,7 +188,6 @@ class AppHost : public std::enable_shared_from_this<AppHost>
winrt::TerminalApp::TerminalWindow::FullscreenChanged_revoker FullscreenChanged;
winrt::TerminalApp::TerminalWindow::FocusModeChanged_revoker FocusModeChanged;
winrt::TerminalApp::TerminalWindow::AlwaysOnTopChanged_revoker AlwaysOnTopChanged;
winrt::TerminalApp::TerminalWindow::ShowTabsFullscreenChanged_revoker ShowTabsFullscreenChanged;
winrt::TerminalApp::TerminalWindow::RaiseVisualBell_revoker RaiseVisualBell;
winrt::TerminalApp::TerminalWindow::SystemMenuChangeRequested_revoker SystemMenuChangeRequested;
winrt::TerminalApp::TerminalWindow::ChangeMaximizeRequested_revoker ChangeMaximizeRequested;
Expand Down

0 comments on commit c3dd1f8

Please sign in to comment.