freebsd-ports/audio/wsoundprefs/files/patch-ac
Pav Lucistnik 5155c1f383 - link against fontconfig [1] and libXft [2]
- misc WM api changes [1] and [2]
- XClearArea -> XFillRectangle with gray [1] because XClearArea is for Window
  not Drawable (was causing X BadWindow error)

  [1] me
  [2] ports/75000 Serge Gagnon <ser_gagnon@sympatico.ca>

If you hit "play" with a nonexistant file, the program dies - but apart from
that it's now functional again.

PR:		ports/79746
Submitted by:	Sam Lawrance <boris@brooknet.com.au>
2005-04-10 16:35:23 +00:00

41 lines
1.4 KiB
Text

--- src/SoundPaths.c.orig Mon Jun 14 17:28:21 1999
+++ src/SoundPaths.c Sun Apr 10 21:41:00 2005
@@ -42,7 +42,8 @@
Panel *panel = (Panel*)WMGetHangedData(lPtr);
WMScreen *scr = WMWidgetScreen(lPtr);
Display *dpy = WMScreenDisplay(scr);
-
+ WMColor *gray = WMGrayColor(scr);
+
width = rect->size.width;
height = rect->size.height;
x = rect->pos.x;
@@ -50,13 +51,16 @@
if (state & WLDSSelected)
XFillRectangle(dpy, d, WMColorGC(panel->white), x, y, width, height);
- else
- XClearArea(dpy, d, x, y, width, height, False);
+ else
+ XFillRectangle(dpy, d, WMColorGC(gray), x, y, width, height);
+
if (state & 1)
- WMDrawString(scr, d, WMColorGC(panel->red), panel->font, x+4, y, text, strlen(text));
+ WMDrawString(scr, d, panel->red, panel->font, x+4, y, text, strlen(text));
else
- WMDrawString(scr, d, WMColorGC(panel->black), panel->font, x+4, y,text, strlen(text));
+ WMDrawString(scr, d, panel->black, panel->font, x+4, y,text, strlen(text));
+
+ WMReleaseColor(gray);
}
void
@@ -71,6 +75,7 @@
wwarning(_("bad value in option SoundPath. Using default path list"));
addPathToList(panel->sndL, -1, "~/GNUstep/Library/WindowMaker/Sounds");
addPathToList(panel->sndL, -1, "/usr/local/share/WindowMaker/Sounds");
+ addPathToList(panel->sndL, -1, "/usr/X11R6/share/WindowMaker/Sounds");
} else {
for (i=0; i<PLGetNumberOfElements(array); i++) {
val = PLGetArrayElement(array, i);