Skip to content

Commit

Permalink
Merged PR 4271163: [Git2Git] Remove use of private theme APIs
Browse files Browse the repository at this point in the history
References MSFT:24418178
  • Loading branch information
miniksa authored and DHowett committed Feb 3, 2020
1 parent eb480b6 commit bc7eb96
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 187 deletions.
6 changes: 6 additions & 0 deletions src/inc/conint.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@ namespace Microsoft::Console::Internal

[[nodiscard]] HRESULT CheckIntegrityLevelPolicy(const HANDLE hOtherToken,
bool& fIsWrongWayBlocked) noexcept;


}

namespace EdpPolicy
{
void AuditClipboard(const std::wstring_view destinationName) noexcept;
}

namespace Theming
{
[[nodiscard]] HRESULT TrySetDarkMode(HWND hwnd) noexcept;
}
}
2 changes: 0 additions & 2 deletions src/interactivity/win32/lib/win32.LIB.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<ClCompile Include="..\WindowIo.cpp" />
<ClCompile Include="..\WindowMetrics.cpp" />
<ClCompile Include="..\WindowProc.cpp" />
<ClCompile Include="..\windowtheme.cpp" />
<ClCompile Include="..\windowUiaProvider.cpp" />
</ItemGroup>
<ItemGroup>
Expand All @@ -59,7 +58,6 @@
<ClInclude Include="..\WindowIme.hpp" />
<ClInclude Include="..\WindowMetrics.hpp" />
<ClInclude Include="..\WindowIo.hpp" />
<ClInclude Include="..\windowtheme.hpp" />
<ClInclude Include="..\windowUiaProvider.hpp" />
</ItemGroup>
<ItemDefinitionGroup>
Expand Down
6 changes: 0 additions & 6 deletions src/interactivity/win32/lib/win32.LIB.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@
<ClCompile Include="..\InputServices.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\windowtheme.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\windowUiaProvider.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -131,9 +128,6 @@
<ClInclude Include="..\InputServices.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\windowtheme.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\windowUiaProvider.hpp">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
1 change: 0 additions & 1 deletion src/interactivity/win32/sources.inc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ SOURCES = \
..\windowio.cpp \
..\WindowMetrics.cpp \
..\windowproc.cpp \
..\windowtheme.cpp \
..\windowUiaProvider.cpp \

INCLUDES = \
Expand Down
10 changes: 3 additions & 7 deletions src/interactivity/win32/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include "windowio.hpp"
#include "windowdpiapi.hpp"
#include "windowmetrics.hpp"
#include "windowtheme.hpp"

#include "..\..\inc\conint.h"

#include "..\..\host\globals.h"
#include "..\..\host\dbcs.h"
Expand Down Expand Up @@ -349,12 +350,7 @@ void Window::_UpdateSystemMetrics() const
siAttached.PostUpdateWindowSize();

// Locate window theming modules and try to set the dark mode.
try
{
WindowTheme theme;
LOG_IF_FAILED(theme.TrySetDarkMode(_hWnd));
}
CATCH_LOG();
LOG_IF_FAILED(Microsoft::Console::Internal::Theming::TrySetDarkMode(_hWnd));
}
}
}
Expand Down
11 changes: 3 additions & 8 deletions src/interactivity/win32/windowproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

#include "..\inc\ServiceLocator.hpp"

#include "..\interactivity\win32\windowtheme.hpp"
#include "..\..\inc\conint.h"

#include "..\interactivity\win32\CustomWindowMessages.h"

#include "..\interactivity\win32\windowUiaProvider.hpp"
Expand Down Expand Up @@ -336,13 +337,7 @@ using namespace Microsoft::Console::Types;

case WM_SETTINGCHANGE:
{
try
{
WindowTheme theme;
LOG_IF_FAILED(theme.TrySetDarkMode(hWnd));
}
CATCH_LOG();

LOG_IF_FAILED(Microsoft::Console::Internal::Theming::TrySetDarkMode(hWnd));
gci.GetCursorBlinker().SettingsChanged();
}
__fallthrough;
Expand Down
130 changes: 0 additions & 130 deletions src/interactivity/win32/windowtheme.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions src/interactivity/win32/windowtheme.hpp

This file was deleted.

5 changes: 5 additions & 0 deletions src/internal/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ using namespace Microsoft::Console::Internal;
void EdpPolicy::AuditClipboard(const std::wstring_view /*destinationName*/) noexcept
{
}

[[nodiscard]] HRESULT Theming::TrySetDarkMode(HWND /*hwnd*/) noexcept
{
return S_FALSE;
}

0 comments on commit bc7eb96

Please sign in to comment.