From 4e7bbd237b3ee62082141c0ab5cafd39cc0f7f3d Mon Sep 17 00:00:00 2001 From: pit-ray Date: Tue, 13 Feb 2024 16:13:24 +0900 Subject: [PATCH] remove error handling --- include/fluent_tray.hpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/include/fluent_tray.hpp b/include/fluent_tray.hpp index 854427c..7ec4271 100644 --- a/include/fluent_tray.hpp +++ b/include/fluent_tray.hpp @@ -1109,16 +1109,8 @@ namespace fluent_tray * @return Returns true on success, false on failure. */ bool hide_menu_window() { - if(!visible_) { - return true ; - } - if(GetForegroundWindow() == hwnd_) { - if(!ShowWindow(hwnd_, SW_HIDE)) { - return false ; - } - } + ShowWindow(hwnd_, SW_HIDE) ; visible_ = false ; - std::fill(mouse_is_over_.begin(), mouse_is_over_.end(), false) ; return true ; }