mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
User/bretan/fz remove legacy editor (#1)
* Removed and runs Still needs some extra cleanup and addressing open issues * Removed and runs Still needs some extra cleanup and addressing open issues * Clean * Update
This commit is contained in:
@@ -12,7 +12,6 @@ struct ZoneSetInfo
|
||||
{
|
||||
size_t NumberOfZones = 0;
|
||||
size_t NumberOfWindows = 0;
|
||||
ZoneSetLayout Layout = ZoneSetLayout::Custom;
|
||||
};
|
||||
|
||||
ZoneSetInfo GetZoneSetInfo(_In_opt_ winrt::com_ptr<IZoneSet> set) noexcept
|
||||
@@ -22,7 +21,6 @@ ZoneSetInfo GetZoneSetInfo(_In_opt_ winrt::com_ptr<IZoneSet> set) noexcept
|
||||
{
|
||||
auto zones = set->GetZones();
|
||||
info.NumberOfZones = zones.size();
|
||||
info.Layout = set->GetLayout();
|
||||
info.NumberOfWindows = std::count_if(zones.cbegin(), zones.cend(), [&](winrt::com_ptr<IZone> zone)
|
||||
{
|
||||
return !zone->IsEmpty();
|
||||
@@ -31,7 +29,6 @@ ZoneSetInfo GetZoneSetInfo(_In_opt_ winrt::com_ptr<IZoneSet> set) noexcept
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
void Trace::RegisterProvider() noexcept
|
||||
{
|
||||
TraceLoggingRegister(g_hProvider);
|
||||
@@ -52,16 +49,6 @@ void Trace::FancyZones::EnableFancyZones(bool enabled) noexcept
|
||||
TraceLoggingBoolean(enabled, "Enabled"));
|
||||
}
|
||||
|
||||
void Trace::FancyZones::ToggleZoneViewers(bool visible) noexcept
|
||||
{
|
||||
TraceLoggingWrite(
|
||||
g_hProvider,
|
||||
"FancyZones_ToggleZoneViewers",
|
||||
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
|
||||
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
|
||||
TraceLoggingBoolean(visible, "Visible"));
|
||||
}
|
||||
|
||||
void Trace::FancyZones::OnKeyDown(DWORD vkCode, bool win, bool control, bool inMoveSize) noexcept
|
||||
{
|
||||
TraceLoggingWrite(
|
||||
@@ -100,15 +87,14 @@ void Trace::VirtualDesktopChanged() noexcept
|
||||
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE));
|
||||
}
|
||||
|
||||
void Trace::ZoneWindow::KeyUp(WPARAM wParam, bool isEditorMode) noexcept
|
||||
void Trace::ZoneWindow::KeyUp(WPARAM wParam) noexcept
|
||||
{
|
||||
TraceLoggingWrite(
|
||||
g_hProvider,
|
||||
"FancyZones_ZoneWindowKeyUp",
|
||||
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
|
||||
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
|
||||
TraceLoggingValue(wParam, "KeyboardValue"),
|
||||
TraceLoggingBoolean(isEditorMode, "EditorMode"));
|
||||
TraceLoggingValue(wParam, "KeyboardValue"));
|
||||
}
|
||||
|
||||
void Trace::ZoneWindow::MoveSizeEnd(_In_opt_ winrt::com_ptr<IZoneSet> activeSet) noexcept
|
||||
@@ -121,8 +107,7 @@ void Trace::ZoneWindow::MoveSizeEnd(_In_opt_ winrt::com_ptr<IZoneSet> activeSet)
|
||||
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
|
||||
TraceLoggingValue(reinterpret_cast<void*>(activeSet.get()), "ActiveSet"),
|
||||
TraceLoggingValue(zoneInfo.NumberOfZones, "NumberOfZones"),
|
||||
TraceLoggingValue(zoneInfo.NumberOfWindows, "NumberOfWindows"),
|
||||
TraceLoggingValue(static_cast<int>(zoneInfo.Layout), "LayoutKind"));
|
||||
TraceLoggingValue(zoneInfo.NumberOfWindows, "NumberOfWindows"));
|
||||
}
|
||||
|
||||
void Trace::ZoneWindow::CycleActiveZoneSet(_In_opt_ winrt::com_ptr<IZoneSet> activeSet, InputMode mode) noexcept
|
||||
@@ -136,29 +121,5 @@ void Trace::ZoneWindow::CycleActiveZoneSet(_In_opt_ winrt::com_ptr<IZoneSet> act
|
||||
TraceLoggingValue(reinterpret_cast<void*>(activeSet.get()), "ActiveSet"),
|
||||
TraceLoggingValue(zoneInfo.NumberOfZones, "NumberOfZones"),
|
||||
TraceLoggingValue(zoneInfo.NumberOfWindows, "NumberOfWindows"),
|
||||
TraceLoggingValue(static_cast<int>(zoneInfo.Layout), "LayoutKind"),
|
||||
TraceLoggingValue(static_cast<int>(mode), "InputMode"));
|
||||
}
|
||||
|
||||
void Trace::ZoneWindow::EditorModeActivity::Start() noexcept
|
||||
{
|
||||
m_activity = TraceLoggingActivity<g_hProvider, PROJECT_KEYWORD_MEASURE>();
|
||||
TraceLoggingWriteStart(
|
||||
m_activity.value(),
|
||||
"FancyZones_Activity_EditorMode",
|
||||
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance));
|
||||
}
|
||||
|
||||
void Trace::ZoneWindow::EditorModeActivity::Stop(_In_opt_ winrt::com_ptr<IZoneSet> activeSet) noexcept
|
||||
{
|
||||
auto const zoneInfo = GetZoneSetInfo(activeSet);
|
||||
TraceLoggingWriteStop(
|
||||
m_activity.value(),
|
||||
"FancyZones_Activity_EditorMode",
|
||||
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
|
||||
TraceLoggingValue(reinterpret_cast<void*>(activeSet.get()), "ActiveSet"),
|
||||
TraceLoggingValue(zoneInfo.NumberOfZones, "NumberOfZones"),
|
||||
TraceLoggingValue(zoneInfo.NumberOfWindows, "NumberOfWindows"),
|
||||
TraceLoggingValue(static_cast<int>(zoneInfo.Layout), "LayoutKind"));
|
||||
m_activity.reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user