Merge pull request #10517 from yuya-oc/win7-notification-duration
Set duration for Windows 7 notifications based on Control Panel
This commit is contained in:
commit
2abde14a7c
1 changed files with 6 additions and 1 deletions
|
@ -641,7 +641,12 @@ void DesktopNotificationController::Toast::CancelDismiss() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopNotificationController::Toast::ScheduleDismissal() {
|
void DesktopNotificationController::Toast::ScheduleDismissal() {
|
||||||
SetTimer(hwnd_, TimerID_AutoDismiss, 4000, nullptr);
|
ULONG duration;
|
||||||
|
auto result = SystemParametersInfo(SPI_GETMESSAGEDURATION, 0, &duration, 0);
|
||||||
|
if (result == FALSE) {
|
||||||
|
duration = 5;
|
||||||
|
}
|
||||||
|
SetTimer(hwnd_, TimerID_AutoDismiss, duration * 1000, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopNotificationController::Toast::ResetContents() {
|
void DesktopNotificationController::Toast::ResetContents() {
|
||||||
|
|
Loading…
Reference in a new issue