mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 21:48:36 +03:00
e-menu usage telemetry (4/4): Call WindowsNotifier.logEvent() with
EMenuClick` event when system tray icon is clicked
Summary: ## Background: E-Menu is a system tray icon that will help you to know more about your checked out Eden repos, to run some operation using Eden Daemon and to report any issue with the Eden. There is no way today to track usage of the usage of this icon. ## Solution: Introduce a new Scuba event for e-menu usage and intrument it for various user interactions with e-menu starting with e-menu click ## Implementation: 1. Add a new `EMenuActionEvent` in LogEvent.h 2. Introduce `StructuredLogger` in WindowsNotifier 3. Add `logEvent` method to WindowsNotifier to instrument events to Scuba 4. **Call `WindowsNotifier.logEvent() with `EMenuClick` event when system tray icon is clicked** ## Tracking: [Scuba](https://fburl.com/scuba/edenfs_events/3bbv9j15) Reviewed By: MichaelCuevas Differential Revision: D60475738 fbshipit-source-id: 70edff521616911e180aca24b45602f5784e6790
This commit is contained in:
parent
7d1b0dac94
commit
375f1ca0be
@ -462,10 +462,11 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) noexcept {
|
||||
// is prerable to listening to mouse clicks and key presses
|
||||
// directly.
|
||||
case WM_CONTEXTMENU: {
|
||||
auto notifier = getWindowsNotifier(hwnd);
|
||||
notifier->logEvent(EMenuActionEvent{EMenuActionEvent::EMenuClick});
|
||||
POINT pt = {};
|
||||
pt.x = GET_X_LPARAM(wParam);
|
||||
pt.y = GET_Y_LPARAM(wParam);
|
||||
auto notifier = getWindowsNotifier(hwnd);
|
||||
notifier->showContextMenu(hwnd, pt);
|
||||
} break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user