changed indentation to use spaces only
[wmaker-crm.git] / src / wsound.c
blob51218b154ba150690ba91afdcc16393a7e0c2c72
1 #include "wconfig.h"
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <X11/X.h>
6 #include <X11/Xlib.h>
7 #include <X11/Xutil.h>
8 #include <X11/Xproto.h>
10 #include "WindowMaker.h"
11 #include "funcs.h"
12 #include "wsound.h"
17 extern WPreferences wPreferences;
19 void
20 wSoundPlay(long event_sound)
22 static Atom atom = 0;
23 XEvent sound_event;
25 if (!atom) {
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);
39 XFlush(dpy);