1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Applied patch from Largo to update sound related stuff and documentation

This commit is contained in:
dan
2001-01-18 01:33:44 +00:00
parent b4851afbb7
commit 1b587b01ee
19 changed files with 122 additions and 177 deletions

23
INSTALL
View File

@@ -334,15 +334,6 @@ apply.
INSTALLATION:
=============
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
You can get the file at ftp://ftp.windowmaker.org. This file is optional
and only have a few icons, and themes. Look for the latest <version-number>
available.
Also there is a WindowMaker-extra.readme to instruct you where that package
should go.
Build Window Maker
------------------
For a quick start, type the following in your shell prompt:
@@ -417,6 +408,20 @@ Read the User Guide for a more in-depth explanation of Window Maker.
You might want to take a look at the FAQ too.
Installing the extras package
-----------------------------
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
You can get the file at ftp://ftp.windowmaker.org. This file is optional
and only have a few icons, and themes. Look for the latest <version-number>
available.
Also there is a WindowMaker-extra.readme to instruct you where that package
should go.
I don't have the root password :(
---------------------------------

View File

@@ -1921,7 +1921,7 @@ createPanel(Panel *p)
WMMapSubwidgets(panel->bgF);
#endif
#endif /* unfinished */
/*** options ***/
panel->optF = WMCreateFrame(panel->frame);
WMSetFrameRelief(panel->optF, WRFlat);

View File

@@ -386,8 +386,8 @@ createPanel(Panel *p)
}
WMSetBalloonTextForView(_("Disable/enable `superfluous' features and\n"
"animations. These include the `ghosting' of the\n"
"dock when it's being moved to the another side\n"
"and the explosion animation for undocked icons."),
"dock when it's being moved to another side and\n"
"the explosion animation when undocking icons."),
WMWidgetView(panel->supB));
panel->sfxB = WMCreateButton(panel->animF, WBTToggle);
@@ -409,7 +409,7 @@ createPanel(Panel *p)
"for actions like shading and closing a window.\n"
"You will need a module distributed separately\n"
"for this. You can get it at:\n"
"http://www.frontiernet.net/~southgat/wmsound"),
"http://shadowmere.student.utwente.nl/"),
WMWidgetView(panel->sfxB));
panel->noteL = WMCreateLabel(panel->animF);
@@ -522,7 +522,7 @@ InitConfigurations(WMScreen *scr, WMWindow *win)
panel->description = _("Animation speeds, titlebar styles, various option\n"
"toggling and number of colors to reserve for\n"
"Window Maker in 8bit displays.");
"Window Maker on 8bit displays.");
panel->win = win;

View File

@@ -38,7 +38,6 @@
#include "TexturePanel.h"
#define MAX_SECTION_PARTS 5
typedef struct _TexturePanel {

View File

@@ -45,7 +45,6 @@
#define WVERSION "0.43"
#define WMVERSION "0.62.x"
extern char *NOptionValueChanged;
typedef struct _Panel Panel;

View File

@@ -4,7 +4,7 @@
Logo.WMClip = {Icon = clip.#extension#;};
Dockit = {Icon = GNUstep3D.#extension#;};
DockApp = {NoAppIcon = NO;};
WMSoundServer = {Icon = sound.#extension#;};
WSoundServer = {Icon = sound.#extension#;};
panel.Panel = {NoAppIcon = YES;};
gmc.Gmc = {NoAppIcon = YES;};
XTerm = {Icon = Terminal.#extension#;};

View File

@@ -55,7 +55,7 @@
#undef I18N
/* define if you want sound support */
#undef WMSOUND
#undef WSOUND
/* define if you want the 'lite' version */
#undef LITE

View File

@@ -758,7 +758,7 @@ AC_ARG_ENABLE(sound,
[ --disable-sound disable sound support ],
sound=$enableval, sound=yes)
if test "$sound" = yes; then
AC_DEFINE(WMSOUND)
AC_DEFINE(WSOUND)
fi

View File

@@ -98,8 +98,8 @@ wmaker_SOURCES = \
winspector.c \
workspace.c \
workspace.h \
wmsound.c \
wmsound.h \
wsound.c \
wsound.h \
text.c \
text.h

View File

@@ -55,8 +55,8 @@
# include "kwm.h"
#endif
#ifdef WMSOUND
#include "wmsound.h"
#ifdef WSOUND
#include "wsound.h"
#endif
@@ -273,8 +273,8 @@ wShadeWindow(WWindow *wwin)
XLowerWindow(dpy, wwin->client_win);
#ifdef WMSOUND
wSoundPlay(WMSOUND_SHADE);
#ifdef WSOUND
wSoundPlay(WSOUND_SHADE);
#endif
#ifdef ANIMATIONS
@@ -360,8 +360,8 @@ wUnshadeWindow(WWindow *wwin)
wwin->flags.mapped = 1;
XMapWindow(dpy, wwin->client_win);
#ifdef WMSOUND
wSoundPlay(WMSOUND_UNSHADE);
#ifdef WSOUND
wSoundPlay(WSOUND_UNSHADE);
#endif
#ifdef ANIMATIONS
@@ -515,8 +515,8 @@ wMaximizeWindow(WWindow *wwin, int directions)
wKWMSendEventMessage(wwin, WKWMChangedClient);
#endif
#ifdef WMSOUND
wSoundPlay(WMSOUND_MAXIMIZE);
#ifdef WSOUND
wSoundPlay(WSOUND_MAXIMIZE);
#endif
}
@@ -549,8 +549,8 @@ wUnmaximizeWindow(WWindow *wwin)
wKWMSendEventMessage(wwin, WKWMChangedClient);
#endif
#ifdef WMSOUND
wSoundPlay(WMSOUND_UNMAXIMIZE);
#ifdef WSOUND
wSoundPlay(WSOUND_UNMAXIMIZE);
#endif
}
@@ -970,8 +970,8 @@ wIconifyWindow(WWindow *wwin)
unmapTransientsFor(wwin);
if (present) {
#ifdef WMSOUND
wSoundPlay(WMSOUND_ICONIFY);
#ifdef WSOUND
wSoundPlay(WSOUND_ICONIFY);
#endif
XUngrabPointer(dpy, CurrentTime);
@@ -1124,8 +1124,8 @@ wDeiconifyWindow(WWindow *wwin)
XUnmapWindow(dpy, wwin->icon->core->window);
}
#ifdef WMSOUND
wSoundPlay(WMSOUND_DEICONIFY);
#ifdef WSOUND
wSoundPlay(WSOUND_DEICONIFY);
#endif
/* if the window is in another workspace, do it silently */
@@ -1242,8 +1242,8 @@ hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate)
wClientSetState(wwin, IconicState, icon->icon_win);
flushExpose();
#ifdef WMSOUND
wSoundPlay(WMSOUND_HIDE);
#ifdef WSOUND
wSoundPlay(WSOUND_HIDE);
#endif
#ifdef ANIMATIONS
if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations &&
@@ -1457,8 +1457,8 @@ unhideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate,
wwin->flags.hidden=0;
wwin->flags.mapped=1;
#ifdef WMSOUND
wSoundPlay(WMSOUND_UNHIDE);
#ifdef WSOUND
wSoundPlay(WSOUND_UNHIDE);
#endif
#ifdef ANIMATIONS
if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations

View File

@@ -47,7 +47,7 @@
#ifdef XDND
#include "xdnd.h"
#endif
#include "wmsound.h"
#include "wsound.h"
#include "WINGsP.h"
@@ -900,8 +900,8 @@ appIconMouseDown(WObjDescriptor *desc, XEvent *event)
aicon->y_pos);
}
#ifdef WMSOUND
wSoundPlay(WMSOUND_DOCK);
#ifdef WSOUND
wSoundPlay(WSOUND_DOCK);
#endif
} else {
XMoveWindow(dpy, icon->core->window, x, y);

View File

@@ -46,8 +46,8 @@
#include "dock.h"
#ifdef WMSOUND
#include "wmsound.h"
#ifdef WSOUND
#include "wsound.h"
#endif
@@ -414,8 +414,8 @@ wApplicationCreate(WScreen *scr, Window main_window)
scr->wapp_list = wapp;
#ifdef WMSOUND
wSoundPlay(WMSOUND_APPSTART);
#ifdef WSOUND
wSoundPlay(WSOUND_APPSTART);
#endif
#ifdef DEBUG
@@ -517,8 +517,8 @@ wApplicationDestroy(WApplication *wapp)
wArrangeIcons(scr, True);
}
#ifdef WMSOUND
wSoundPlay(WMSOUND_APPEXIT);
#ifdef WSOUND
wSoundPlay(WSOUND_APPEXIT);
#endif
}

View File

@@ -1220,7 +1220,7 @@ wShowInfoPanel(WScreen *scr)
#ifdef OLWM_HINTS
list[j++] = "OLWM";
#endif
#ifdef WMSOUND
#ifdef WSOUND
list[j++] = "Sound";
#endif

View File

@@ -53,7 +53,7 @@
#include "workspace.h"
#include "framewin.h"
#include "superfluous.h"
#include "wmsound.h"
#include "wsound.h"
#include <proplist.h>
@@ -3937,18 +3937,18 @@ handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
if (aicon->icon->selected)
wIconSelect(aicon->icon);
#ifdef WMSOUND
wSoundPlay(WMSOUND_KABOOM);
#ifdef WSOUND
wSoundPlay(WSOUND_KABOOM);
#endif
DoKaboom(scr,aicon->icon->core->window, x, y);
#ifdef WMSOUND
#ifdef WSOUND
} else {
wSoundPlay(WMSOUND_UNDOCK);
wSoundPlay(WSOUND_UNDOCK);
#endif
}
#ifdef WMSOUND
#ifdef WSOUND
} else {
wSoundPlay(WMSOUND_UNDOCK);
wSoundPlay(WSOUND_UNDOCK);
#endif
}
if (clip && clip->auto_raise_lower)

View File

@@ -637,13 +637,9 @@ handleButtonPress(XEvent *event)
}
#ifdef MOUSE_WS_SWITCH
else if (event->xbutton.button==Button5) {
wWorkspaceRelativeChange(scr, -1);
} else if (event->xbutton.button==Button4) {
wWorkspaceRelativeChange(scr, 1);
}
#endif /* MOUSE_WS_SWITCH */
#ifdef GNOME_STUFF

View File

@@ -1,89 +0,0 @@
#include "wconfig.h"
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xproto.h>
#include "WindowMaker.h"
#include "funcs.h"
#include "wmsound.h"
#ifdef WMSOUND
extern WPreferences wPreferences;
#if 0
void
wSoundServerGrab(Window wm_win)
{
Window *lstChildren;
Window retRoot;
Window retParent;
int indexCount;
u_int numChildren;
XClassHint *retHint;
if (XQueryTree(dpy, wm_win, &retRoot, &retParent, &lstChildren, &numChildren)) {
for (indexCount = 1; indexCount < numChildren; indexCount++) {
retHint = XAllocClassHint();
if (!retHint) {
XFree(lstChildren);
return;
}
XGetClassHint (dpy, lstChildren[indexCount], retHint);
if (retHint->res_class) {
if (strcmp("WMSoundServer", retHint->res_class)==0 ||
/*strcmp("WSoundServer", retHint->res_class)==0 ||*/
(retHint->res_name &&
strcmp("wsoundserver", retHint->res_name)==0 &&
strcmp("DockApp", retHint->res_class)==0)) {
soundServer = lstChildren[indexCount];
XFree(lstChildren);
if(retHint) {
XFree(retHint);
}
return;
}
}
XFree(retHint);
retHint = 0;
}
XFree(lstChildren);
}
return;
}
#endif
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);
}
}
#endif /* WMSOUND */

44
src/wsound.c Normal file
View File

@@ -0,0 +1,44 @@
#include "wconfig.h"
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xproto.h>
#include "WindowMaker.h"
#include "funcs.h"
#include "wsound.h"
#ifdef WSOUND
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);
}
}
#endif /* WSOUND */

View File

@@ -1,5 +1,5 @@
/*
* WMSound Server
* Window Maker Sound Server
*
* Copyright (c) 1997 Anthony P. Quinn
*
@@ -19,34 +19,25 @@
* USA.
*/
#ifndef WMSOUND_H_
#define WMSOUND_H_
#ifndef WSOUND_H_
#define WSOUND_H_
#define WMSOUND_SHADE 1001
#define WMSOUND_UNSHADE 1002
#define WMSOUND_MAXIMIZE 1003
#define WMSOUND_UNMAXIMIZE 1004
#define WMSOUND_ICONIFY 1005
#define WMSOUND_DEICONIFY 1006
#define WMSOUND_HIDE 1007
#define WMSOUND_UNHIDE 1008
#define WMSOUND_APPSTART 1009
#define WMSOUND_APPEXIT 1010
#define WMSOUND_DOCK 1011
#define WMSOUND_UNDOCK 1012
#define WMSOUND_KABOOM 1013
#if 0
/* don't delete this */
extern WWindow *wSoundServer;
extern Atom WSStartup, WSShade, WSUnshade, WSShutdown;
extern Atom WSMaximize, WSUnmaximize, WSIconify, WSUniconify, WSAppStart;
extern Atom WSHide, WSUnhide, WSAppExit, WSDock, WSUnDock, WSKaboom;
extern WApplication *wSoundApp;
#endif
#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 /*WMSOUND_H_*/
#endif /*WSOUND_H_*/