telegramdesktop/tdesktop — pull request #376 by brynthomas (2014-12-31 22:38:38+00:00)
Title: Suppress notifications when in D3D full screen and presentation mode

Addresses issues:
telegramdesktop/tdesktop#228
telegramdesktop/tdesktop#127

Updated to include support for the Vista and later feature that allows one to query the OS to determine if notifications should be suppressed. http://msdn.microsoft.com/en-us/library/bb762242%28VS.85%29.aspx

Checks SHQueryUserNotificationState to see if the system is running a full screen exclusive D3D application, and hides popup notifications. If the Windows Mobility Center feature of "I am currently giving a presentation" is enabled, sounds will be suppressed as well.

This does not impact regular full screen apps, or games running in Windowed (Borderless).

Tested on Windows 8.1 and Windows XP (where XP doesn't support the feature, but is not harmed by the presence of it).