diff --git a/src/notifications.cpp b/src/notifications.cpp index 2058fda2..3a7b4995 100644 --- a/src/notifications.cpp +++ b/src/notifications.cpp @@ -466,7 +466,7 @@ bool _app_notifyshow (HWND hwnd, PR_OBJECT ptr_log_object, bool is_forced, bool else KillTimer (hwnd, NOTIFY_TIMER_SAFETY_ID); - _app_notifysetpos (hwnd); + _app_notifysetpos (hwnd, false); ShowWindow (hwnd, SW_SHOWNA); @@ -545,9 +545,9 @@ void _app_notifyrefresh (HWND hwnd, bool is_safety) _r_obj_dereference (ptr_log_object, &_app_dereferencelog); } -void _app_notifysetpos (HWND hwnd) +void _app_notifysetpos (HWND hwnd, bool is_forced) { - if (IsWindowVisible (hwnd)) + if (!is_forced && IsWindowVisible (hwnd)) { RECT windowRect = {0}; GetWindowRect (hwnd, &windowRect); diff --git a/src/notifications.hpp b/src/notifications.hpp index 0b70aa66..494ee587 100644 --- a/src/notifications.hpp +++ b/src/notifications.hpp @@ -20,7 +20,7 @@ void _app_notifyplaysound (); void _app_notifyrefresh (HWND hwnd, bool is_safety); -void _app_notifysetpos (HWND hwnd); +void _app_notifysetpos (HWND hwnd, bool is_forced); void _app_notifysettext (HDC hdc, HWND hwnd, UINT ctrl_id1, LPCWSTR text1, UINT ctrl_id2, LPCWSTR text2); HFONT _app_notifyinitfont (PLOGFONT plf, LONG height, LONG weight, LPCWSTR name, BOOL is_underline);