diff --git a/src/Makefile.am b/src/Makefile.am index 9a2bce7c..21a8d82d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -100,10 +100,8 @@ wmaker_SOURCES = \ wmspec.c \ workspace.c \ workspace.h \ - wsound.c \ - wsound.h \ text.c \ - text.h + text.h AM_CPPFLAGS = $(DFLAGS) -DLOCALEDIR=\"$(NLSDIR)\" diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 90f0eebe..780afbf1 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -375,7 +375,6 @@ typedef struct WPreferences { char no_dithering; /* use dithering or not */ - char no_sound; /* enable/disable sound */ char no_animations; /* enable/disable animations */ char no_autowrap; /* wrap workspace when window is moved diff --git a/src/actions.c b/src/actions.c index bba88951..2aae7581 100644 --- a/src/actions.c +++ b/src/actions.c @@ -46,7 +46,6 @@ #include "appmenu.h" #include "winspector.h" #include "workspace.h" -#include "wsound.h" #include "xinerama.h" /****** Global Variables ******/ @@ -227,7 +226,6 @@ void wShadeWindow(WWindow *wwin) return; XLowerWindow(dpy, wwin->client_win); - wSoundPlay(WSOUND_SHADE); shade_animate(wwin, SHADE); wwin->flags.skip_next_animation = 0; @@ -268,7 +266,6 @@ void wUnshadeWindow(WWindow *wwin) wwin->flags.mapped = 1; XMapWindow(dpy, wwin->client_win); - wSoundPlay(WSOUND_UNSHADE); shade_animate(wwin, UNSHADE); wwin->flags.skip_next_animation = 0; @@ -396,7 +393,6 @@ void wMaximizeWindow(WWindow * wwin, int directions) WMPostNotificationName(WMNChangedState, wwin, "maximize"); - wSoundPlay(WSOUND_MAXIMIZE); /* set maximization state */ wwin->flags.maximized = directions; } @@ -561,8 +557,6 @@ void wUnmaximizeWindow(WWindow * wwin) wWindowConfigure(wwin, x, y, w, h); WMPostNotificationName(WMNChangedState, wwin, "maximize"); - - wSoundPlay(WSOUND_UNMAXIMIZE); } void wFullscreenWindow(WWindow * wwin) @@ -1015,8 +1009,6 @@ void wIconifyWindow(WWindow * wwin) unmapTransientsFor(wwin); if (present) { - wSoundPlay(WSOUND_ICONIFY); - XUngrabPointer(dpy, CurrentTime); wWindowUnmap(wwin); /* let all Expose events arrive so that we can repaint @@ -1191,9 +1183,6 @@ void wDeiconifyWindow(WWindow * wwin) } } - if (!netwm_hidden) - wSoundPlay(WSOUND_DEICONIFY); - /* if the window is in another workspace, do it silently */ if (!netwm_hidden) { #ifdef ANIMATIONS @@ -1308,7 +1297,7 @@ static void hideWindow(WIcon * icon, int icon_x, int icon_y, WWindow * wwin, int wClientSetState(wwin, IconicState, icon->icon_win); flushExpose(); - wSoundPlay(WSOUND_HIDE); + #ifdef ANIMATIONS if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations && !wwin->flags.skip_next_animation && animate) { @@ -1440,7 +1429,6 @@ static void unhideWindow(WIcon * icon, int icon_x, int icon_y, WWindow * wwin, i wwin->flags.hidden = 0; - wSoundPlay(WSOUND_UNHIDE); #ifdef ANIMATIONS if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations && animate) { animateResize(wwin->screen_ptr, icon_x, icon_y, diff --git a/src/appicon.c b/src/appicon.c index cac85f4b..37c9171d 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -47,7 +47,6 @@ #ifdef XDND #include "xdnd.h" #endif -#include "wsound.h" /* * icon_file for the dock is got from the preferences file by @@ -718,8 +717,6 @@ void appIconMouseDown(WObjDescriptor * desc, XEvent * event) * position */ SlideWindow(icon->core->window, x, y, oldX, oldY); } - - wSoundPlay(WSOUND_DOCK); } else { if (movingSingle) { /* move back to its place */ diff --git a/src/application.c b/src/application.c index 20ee3041..91e63c89 100644 --- a/src/application.c +++ b/src/application.c @@ -48,7 +48,6 @@ #include "defaults.h" #include "workspace.h" #include "dock.h" -#include "wsound.h" #include "xinerama.h" @@ -401,7 +400,6 @@ WApplication *wApplicationCreate(WWindow * wwin) extractClientIcon(wapp->app_icon); } - wSoundPlay(WSOUND_APPSTART); #ifdef DEBUG printf("Created application for %x\n", (unsigned)main_window); @@ -473,6 +471,4 @@ void wApplicationDestroy(WApplication * wapp) if (wPreferences.auto_arrange_icons) { wArrangeIcons(scr, True); } - - wSoundPlay(WSOUND_APPEXIT); } diff --git a/src/defaults.c b/src/defaults.c index 555bdac1..58c823d0 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -440,8 +440,6 @@ WDefaultEntry optionList[] = { &wPreferences.use_saveunders, getBool, NULL}, {"OpaqueMove", "NO", NULL, &wPreferences.opaque_move, getBool, NULL}, - {"DisableSound", "NO", NULL, - &wPreferences.no_sound, getBool, NULL}, {"DisableAnimations", "NO", NULL, &wPreferences.no_animations, getBool, NULL}, {"DontLinkWorkspaces", "NO", NULL, diff --git a/src/dialog.c b/src/dialog.c index f08fdf4e..530004c4 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -1624,12 +1624,6 @@ void wShowInfoPanel(WScreen * scr) strbuf = wstrappend(strbuf, buf); } - if (wPreferences.no_sound) { - strbuf = wstrappend(strbuf, _("\nSound disabled")); - } else { - strbuf = wstrappend(strbuf, _("\nSound enabled")); - } - #ifdef VIRTUAL_DESKTOP if (wPreferences.vdesk_enable) strbuf = wstrappend(strbuf, _(", VirtualDesktop enabled")); diff --git a/src/dock.c b/src/dock.c index bd5b010f..46d45f4a 100644 --- a/src/dock.c +++ b/src/dock.c @@ -52,7 +52,6 @@ #include "workspace.h" #include "framewin.h" #include "superfluous.h" -#include "wsound.h" #include "xinerama.h" /**** Local variables ****/ @@ -3681,13 +3680,8 @@ static Bool handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event) if (aicon->icon->selected) wIconSelect(aicon->icon); - wSoundPlay(WSOUND_KABOOM); DoKaboom(scr, aicon->icon->core->window, x, y); - } else { - wSoundPlay(WSOUND_UNDOCK); } - } else { - wSoundPlay(WSOUND_UNDOCK); } if (clip && clip->auto_raise_lower) wDockLower(clip); diff --git a/src/wsound.c b/src/wsound.c deleted file mode 100644 index 85cc5014..00000000 --- a/src/wsound.c +++ /dev/null @@ -1,37 +0,0 @@ -#include "wconfig.h" - -#include -#include -#include -#include -#include -#include - -#include "WindowMaker.h" -#include "funcs.h" -#include "wsound.h" - -extern WPreferences wPreferences; - -void wSoundPlay(long event_sound) -{ - static Atom atom = 0; - XEvent sound_event; - - if (!atom) { - atom = XInternAtom(dpy, "_WINDOWMAKER_EVENT", False); - } - - if (!wPreferences.no_sound) { - Window win = wScreenWithNumber(0)->info_window; - - sound_event.xclient.type = ClientMessage; - sound_event.xclient.message_type = atom; - sound_event.xclient.format = 32; - sound_event.xclient.display = dpy; - sound_event.xclient.window = win; - sound_event.xclient.data.l[0] = event_sound; - XSendEvent(dpy, win, False, StructureNotifyMask, &sound_event); - XFlush(dpy); - } -} diff --git a/src/wsound.h b/src/wsound.h deleted file mode 100644 index 83664469..00000000 --- a/src/wsound.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Window Maker Sound Server - * - * Copyright (c) 1997 Anthony P. Quinn - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - * USA. - */ - -#ifndef WSOUND_H_ -#define WSOUND_H_ - -#define WSOUND_SHADE 1001 -#define WSOUND_UNSHADE 1002 -#define WSOUND_MAXIMIZE 1003 -#define WSOUND_UNMAXIMIZE 1004 -#define WSOUND_ICONIFY 1005 -#define WSOUND_DEICONIFY 1006 -#define WSOUND_HIDE 1007 -#define WSOUND_UNHIDE 1008 -#define WSOUND_APPSTART 1009 -#define WSOUND_APPEXIT 1010 -#define WSOUND_DOCK 1011 -#define WSOUND_UNDOCK 1012 -#define WSOUND_KABOOM 1013 - - -void wSoundPlay(long event_sound); -void wSoundServerGrab(Window wm_win); - -#endif /*WSOUND_H_*/