Telemetry events

* Don't trace event on exit
change 'PowertoyModuleDeleter' to not call 'module->disable();' before 'module->destroy();' so the module can distinguish between being turned off and PowerToys exiting.
Code formatting.

* uppercase for event name

* Trace on/off event for ShortcutGuide module

* Trace the 'hide' event only if the guide was visible
'on_hide()' is invoked when the module is turned off, in that case don't trace the hide event.

* Remove spaces in data field names
Remove 'ShowGuide' event since it's not providing any useful data.

* Include build number in version number
This commit is contained in:
Enrico Giordani
2019-10-22 08:11:23 +02:00
committed by GitHub
parent 5fb59cd64a
commit a07a42624b
11 changed files with 79 additions and 49 deletions

View File

@@ -154,12 +154,7 @@ public:
// Disable the powertoy
virtual void disable()
{
if (m_app)
{
Trace::FancyZones::EnableFancyZones(false);
m_app->Destroy();
m_app = nullptr;
}
Disable(true);
}
// Returns if the powertoy is enabled
@@ -190,7 +185,7 @@ public:
// Destroy the powertoy and free memory
virtual void destroy() override
{
disable();
Disable(false);
delete this;
}
@@ -207,6 +202,18 @@ private:
return WI_IsFlagSet(style, WS_MAXIMIZEBOX) && WI_IsFlagClear(style, WS_CHILD) && WI_IsFlagClear(exStyle, WS_EX_TOOLWINDOW);
}
void Disable(bool const traceEvent)
{
if (m_app) {
if (traceEvent)
{
Trace::FancyZones::EnableFancyZones(false);
}
m_app->Destroy();
m_app = nullptr;
}
}
intptr_t HandleKeyboardHookEvent(LowlevelKeyboardEvent* data) noexcept;
void HandleWinHookEvent(WinHookEvent* data) noexcept;
void MoveSizeStart(HWND window, POINT const& ptScreen) noexcept;