Skip to content

Commit

Permalink
remove error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Feb 13, 2024
1 parent bde70db commit 4e7bbd2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions include/fluent_tray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
}
Expand Down

0 comments on commit 4e7bbd2

Please sign in to comment.