mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user