8 #include <X11/Xproto.h>
10 #include "WindowMaker.h"
17 extern WPreferences wPreferences
;
20 wSoundPlay(long event_sound
)
26 atom
= XInternAtom(dpy
, "_WINDOWMAKER_EVENT", False
);
29 if(!wPreferences
.no_sound
) {
30 Window win
= wScreenWithNumber(0)->info_window
;
32 sound_event
.xclient
.type
= ClientMessage
;
33 sound_event
.xclient
.message_type
= atom
;
34 sound_event
.xclient
.format
= 32;
35 sound_event
.xclient
.display
= dpy
;
36 sound_event
.xclient
.window
= win
;
37 sound_event
.xclient
.data
.l
[0] = event_sound
;
38 XSendEvent(dpy
, win
, False
, StructureNotifyMask
, &sound_event
);