From bf7f33694377dbce1980340313e2bef40e151351 Mon Sep 17 00:00:00 2001 From: pit-ray Date: Tue, 13 Feb 2024 15:57:19 +0900 Subject: [PATCH] set status --- include/fluent_tray.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/fluent_tray.hpp b/include/fluent_tray.hpp index dda5bad..438faea 100644 --- a/include/fluent_tray.hpp +++ b/include/fluent_tray.hpp @@ -937,7 +937,9 @@ namespace fluent_tray get_message(msg) ; if(GetForegroundWindow() != hwnd_ && visible_) { - hide_menu_window() ; + if(!hide_menu_window()) { + status_ = TrayStatus::FAILED ; + } } for(std::size_t i = 0 ; i < menus_.size() ; i ++) { @@ -945,6 +947,7 @@ namespace fluent_tray if(menu.is_mouse_over()) { if(!mouse_is_over_[i]) { if(!change_menu_back_color(menu, ash_color_)) { + status_ = TrayStatus::FAILED ; return false ; } } @@ -953,6 +956,7 @@ namespace fluent_tray else { if(mouse_is_over_[i]) { if(!change_menu_back_color(menu, back_color_)) { + status_ = TrayStatus::FAILED ; return false ; } }