[gtk+/gtk-2-22] win32: Prefer MessageBeep() over Beep()



commit 6fb2c4d031f1b8f7ed6dafa8e5f02e10b94d8f6b
Author: Hans Breuer <hans breuer org>
Date:   Sun Nov 7 22:00:48 2010 +0100

    win32: Prefer MessageBeep() over Beep()
    
    Only the former respects the sound volume setting. If MessageBeep() fails fall back to the latter.
    (cherry picked from commit 5e59db1554a9ee5138c1e9a5e1c21a4f196d476a)

 gdk/win32/gdkmain-win32.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c
index 94b7ac7..dc139be 100644
--- a/gdk/win32/gdkmain-win32.c
+++ b/gdk/win32/gdkmain-win32.c
@@ -197,7 +197,8 @@ void
 gdk_display_beep (GdkDisplay *display)
 {
   g_return_if_fail (display == gdk_display_get_default());
-  Beep(1000, 50);
+  if (!MessageBeep (-1))
+    Beep (1000, 50);
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]