@@ -33,14 +33,12 @@ class TrayIcon::Impl {
3333 using RightClickedCallback = std::function<void (TrayIconId)>;
3434 using DoubleClickedCallback = std::function<void (TrayIconId)>;
3535
36- Impl ()
37- : hwnd_(nullptr ),
38- icon_handle_ (nullptr ),
39- owns_window_(false ) {
36+ Impl () : hwnd_(nullptr ), icon_handle_(nullptr ), owns_window_(false ) {
4037 tray_icon_id_ = IdAllocator::Allocate<TrayIcon>();
4138 }
4239
43- Impl (HWND hwnd, bool owns_window,
40+ Impl (HWND hwnd,
41+ bool owns_window,
4442 ClickedCallback clicked_callback,
4543 RightClickedCallback right_clicked_callback,
4644 DoubleClickedCallback double_clicked_callback)
@@ -85,17 +83,18 @@ class TrayIcon::Impl {
8583 UINT message,
8684 WPARAM wparam,
8785 LPARAM lparam) {
88- if (message == WM_USER + 1 && wparam == static_cast <WPARAM>(tray_icon_id_)) {
86+ if (message == WM_USER + 1 &&
87+ wparam == static_cast <WPARAM>(tray_icon_id_)) {
8988 if (lparam == WM_LBUTTONUP) {
90- std::cout << " TrayIcon: Left button clicked, tray_icon_id = " << tray_icon_id_
91- << std::endl;
89+ std::cout << " TrayIcon: Left button clicked, tray_icon_id = "
90+ << tray_icon_id_ << std::endl;
9291 // Call clicked callback
9392 if (clicked_callback_) {
9493 clicked_callback_ (tray_icon_id_);
9594 }
9695 } else if (lparam == WM_RBUTTONUP) {
97- std::cout << " TrayIcon: Right button clicked, tray_icon_id = " << tray_icon_id_
98- << std::endl;
96+ std::cout << " TrayIcon: Right button clicked, tray_icon_id = "
97+ << tray_icon_id_ << std::endl;
9998 // Call right clicked callback
10099 if (right_clicked_callback_) {
101100 right_clicked_callback_ (tray_icon_id_);
@@ -173,7 +172,8 @@ TrayIcon::TrayIcon(void* native_tray_icon) {
173172 } else {
174173 // Wrap existing native tray icon
175174 // In a real implementation, you'd extract HWND from the tray parameter
176- // For now, this is mainly used by TrayManager for creating uninitialized icons
175+ // For now, this is mainly used by TrayManager for creating uninitialized
176+ // icons
177177 }
178178
179179 // Initialize the Impl with the window handle
@@ -192,10 +192,9 @@ TrayIcon::TrayIcon(void* native_tray_icon) {
192192 this ->Emit <TrayIconDoubleClickedEvent>(id);
193193 };
194194
195- pimpl_ = std::make_unique<Impl>(hwnd, owns_window,
196- std::move (clicked_callback),
197- std::move (right_clicked_callback),
198- std::move (double_clicked_callback));
195+ pimpl_ = std::make_unique<Impl>(
196+ hwnd, owns_window, std::move (clicked_callback),
197+ std::move (right_clicked_callback), std::move (double_clicked_callback));
199198 } else {
200199 // Failed to create window, create uninitialized Impl
201200 pimpl_ = std::make_unique<Impl>();
0 commit comments