From f5177e67d596e3eda3bcfa9abfb7895a47e3d527 Mon Sep 17 00:00:00 2001 From: kojima Date: Tue, 28 Mar 2000 02:48:32 +0000 Subject: [PATCH] updated code to use new bags arbitrary window levels --- COPYING.WTFPL | 45 +++++++++ ChangeLog | 7 +- Makefile.in | 13 ++- README | 7 +- TODO | 1 - WPrefs.app/Makefile.in | 6 +- WPrefs.app/WPrefs.c | 118 ++++++++++++++++++++-- WPrefs.app/WPrefs.h | 2 - WPrefs.app/po/Makefile.in | 13 ++- WPrefs.app/tiff/Makefile.in | 13 ++- WPrefs.app/xpm/Makefile.in | 13 ++- WindowMaker/Backgrounds/Makefile.in | 13 ++- WindowMaker/Defaults/Makefile.in | 13 ++- WindowMaker/IconSets/Makefile.in | 13 ++- WindowMaker/Icons/Makefile.in | 13 ++- WindowMaker/Makefile.in | 13 ++- WindowMaker/Pixmaps/Makefile.in | 13 ++- WindowMaker/Styles/Makefile.in | 13 ++- WindowMaker/Themes/Makefile.in | 13 ++- contrib/Makefile.in | 13 ++- doc/Makefile.in | 13 ++- po/Makefile.in | 13 ++- src/Makefile.in | 6 +- src/WindowMaker.h | 1 - src/event.c | 14 +-- src/moveres.c | 4 +- src/placement.c | 9 +- src/screen.c | 2 + src/screen.h | 9 +- src/session.c | 40 +++++++- src/shutdown.c | 15 ++- src/stacking.c | 193 ++++++++++++++++++------------------ src/window.c | 2 +- test/Makefile.in | 6 +- util/Makefile.in | 6 +- wmlib/Makefile.in | 6 +- wrlib/Makefile.in | 6 +- 37 files changed, 484 insertions(+), 216 deletions(-) create mode 100644 COPYING.WTFPL diff --git a/COPYING.WTFPL b/COPYING.WTFPL new file mode 100644 index 00000000..fa46f4b5 --- /dev/null +++ b/COPYING.WTFPL @@ -0,0 +1,45 @@ + +The following artwork were created by Banlu Kemiyatorn and +are distributed through the license in this file: +GNUstepGlow.tiff +GNUstepGlow.xpm +Magnify.tiff +Magnify.xpm +Terminal.tiff +Terminal.xpm +TerminalGNUstep.tiff +TerminalGNUstep.xpm +TerminalLinux.tiff +TerminalLinux.xpm +tiff/msty1.tiff +tiff/msty2.tiff +tiff/msty3.tiff +xpm/msty1.xpm +xpm/msty2.xpm +xpm/msty3.xpm +WPrefs.tiff +WPrefs.xpm +tiff/tdel.tiff +tiff/tedit.tiff +tiff/textr.tiff +tiff/tnew.tiff +xpm/tdel.xpm +xpm/tedit.xpm +xpm/textr.xpm +xpm/tnew.xpm +inside Resources/Images.tiff "the little house", "the trash can", +"the folder", "the floppies" + + +do What The Fuck you want to Public License + +Version 1.0, March 2000 +Copyright (C) 2000 Banlu Kemiyatorn (]d). +136 Nives 7 Jangwattana 14 Laksi Bangkok +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Ok, the purpose of this license is simple +and you just + +DO WHAT THE FUCK YOU WANT TO. diff --git a/ChangeLog b/ChangeLog index 0b5a614b..72d1e65c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,7 +51,11 @@ Changes since version 0.61.1: - fixed crash bug with broken java implementations (Miguel Covarrubias ) - made Revert on attributes panel apply the reverted changes immediately - to avoid inconsistent internal state + to avoid inconsistent internal state +- color dragging works correctly now +- arbitrary stacking levels +- save window shortcuts in state + Changes since version 0.61.0: ............................. @@ -67,7 +71,6 @@ Changes since version 0.61.0: - fixed crashing bug related to onmipresent icons in Clip - added _WINDOWMAKER_ICON_TILE and _WINDOWMAKER_ICON_SIZE hint in the noticeboard window -- color dragging works correctly now Changes since version 0.60.0: diff --git a/Makefile.in b/Makefile.in index ac335848..aecfcfa8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -109,14 +109,14 @@ mkinstalldirs src/config.h.in src/stamp-h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -283,10 +283,15 @@ distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/README b/README index 22bb0557..d5583867 100644 --- a/README +++ b/README @@ -348,9 +348,14 @@ Window Maker is copyrighted by Alfredo K. Kojima and is licensed through the GNU General Public License. Read the COPYING file for the complete license. The icons that are distributed with this program and were made by Marco van -Hylckama Vlieg are licensed through the OpenContent License. Read the +Hylckama Vlieg, are licensed through the OpenContent License. Read the COPYING.OPL file for the complete license. +The icons listed in COPYING.WTFPL and are distributed in this +program and were made by Banlu Kemiyatorn (]d), are licensed through the +"do What The Fuck you want to Public License". Read the COPYING.WTFPL +file for the complete license. + NeXT, OpenStep and NEXTSTEP are a trademarks of NeXT Computer, Inc. All other trademarks are property of their respective owners. diff --git a/TODO b/TODO index 4f6c66d6..5f544f6d 100644 --- a/TODO +++ b/TODO @@ -28,7 +28,6 @@ Need to do: - remake internal string processing to use wchar? unicode? - add new file for stuff like default commands and dnd commands for docked apps, balloons for the dock etc -- alpha-channel app specified icons Maybe some day: =============== diff --git a/WPrefs.app/Makefile.in b/WPrefs.app/Makefile.in index 156abc44..cb74c444 100644 --- a/WPrefs.app/Makefile.in +++ b/WPrefs.app/Makefile.in @@ -148,7 +148,7 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(WPrefs_SOURCES) OBJECTS = $(WPrefs_OBJECTS) @@ -157,7 +157,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -347,7 +347,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c index b83c94a8..4da15c9e 100644 --- a/WPrefs.app/WPrefs.c +++ b/WPrefs.app/WPrefs.c @@ -59,6 +59,11 @@ extern Panel *InitAppearance(WMScreen *scr, WMWindow *win); + +#define ICON_TITLE_FONT "-adobe-helvetica-bold-r-*-*-10-*" +#define ICON_TITLE_VFONT "-adobe-helvetica-bold-r-*-*-10-[]-*" + + #define MAX_SECTIONS 16 @@ -441,10 +446,90 @@ LocateImage(char *name) } + +static WMPixmap* +makeTitledIcon(WMScreen *scr, WMPixmap *icon, char *title1, char *title2) +{ + return WMRetainPixmap(icon); + +#if 0 + static GC gc = NULL; + static XFontStruct *hfont = NULL; + static XFontStruct *vfont = NULL; + WMPixmap *tmp; + Pixmap pix, mask; + Display *dpy = WMScreenDisplay(scr); + WMColor *black = WMBlackColor(scr); + GC fgc; + WMSize size = WMGetPixmapSize(icon); + + + tmp = WMCreatePixmap(scr, 60, 60, WMScreenDepth(scr), True); + + pix = WMGetPixmapXID(tmp); + mask = WMGetPixmapMaskXID(tmp); + + if (gc == NULL) { + gc = XCreateGC(dpy, mask, 0, NULL); + + hfont = XLoadQueryFont(dpy, ICON_TITLE_FONT); + vfont = XLoadQueryFont(dpy, ICON_TITLE_VFONT); + } + + if (hfont == NULL) { + return WMRetainPixmap(icon); + } + + XSetForeground(dpy, gc, 0); + XFillRectangle(dpy, mask, gc, 0, 0, 60, 60); + + fgc = WMColorGC(black); + + XSetForeground(dpy, gc, 1); + + XCopyArea(dpy, WMGetPixmapXID(icon), pix, fgc, 0, 0, + size.width, size.height, 12, 12); + + if (WMGetPixmapMaskXID(icon) != None) + XCopyPlane(dpy, WMGetPixmapMaskXID(icon), mask, gc, 0, 0, + size.width, size.height, 12, 12, 1); + else + XFillRectangle(dpy, mask, gc, 12, 12, 48, 48); + + + if (title1) { + XSetFont(dpy, fgc, vfont->fid); + XSetFont(dpy, gc, vfont->fid); + + XDrawString(dpy, pix, fgc, 0, vfont->ascent, + title1, strlen(title1)); + + XDrawString(dpy, mask, gc, 0, vfont->ascent, + title1, strlen(title1)); + } + + if (title2) { + XSetFont(dpy, fgc, hfont->fid); + XSetFont(dpy, gc, hfont->fid); + + XDrawString(dpy, pix, fgc, (title1 ? 12 : 0), hfont->ascent, + title2, strlen(title2)); + + XDrawString(dpy, mask, gc, (title1 ? 12 : 0), hfont->ascent, + title2, strlen(title2)); + } + + return tmp; +#endif +} + + void -SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file) +SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file, + char *title1, char *title2) { WMPixmap *icon; + WMPixmap *icon2; RColor color; char *iconPath; @@ -461,11 +546,19 @@ SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file) } else { icon = NULL; } + + if (icon) { + icon2 = makeTitledIcon(scr, icon, title1, title2); + if (icon) + WMReleasePixmap(icon); + } else { + icon2 = NULL; + } + + WMSetButtonImage(bPtr, icon2); - WMSetButtonImage(bPtr, icon); - - if (icon) - WMReleasePixmap(icon); + if (icon2) + WMReleasePixmap(icon2); color.red = 0xff; color.green = 0xff; @@ -508,8 +601,19 @@ AddSection(Panel *panel, char *iconFile) WMSetBalloonTextForView(((PanelRec*)panel)->description, WMWidgetView(bPtr)); - SetButtonAlphaImage(WMWidgetScreen(bPtr), bPtr, iconFile); - + { + char *t1, *t2; + + t1 = wstrdup(((PanelRec*)panel)->sectionName); + t2 = strchr(t1, ' '); + if (t2) { + *t2 = 0; + t2++; + } + SetButtonAlphaImage(WMWidgetScreen(bPtr), bPtr, iconFile, + t1, t2); + free(t1); + } WMMapWidget(bPtr); WPrefs.sectionB[WPrefs.sectionCount] = bPtr; diff --git a/WPrefs.app/WPrefs.h b/WPrefs.app/WPrefs.h index 473297d8..314f288a 100644 --- a/WPrefs.app/WPrefs.h +++ b/WPrefs.app/WPrefs.h @@ -78,8 +78,6 @@ void AddSection(Panel *panel, char *iconFile); char *LocateImage(char *name); -void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file); - WMWindow *GetWindow(Panel *panel); /* manipulate the dictionary for the WindowMaker domain */ diff --git a/WPrefs.app/po/Makefile.in b/WPrefs.app/po/Makefile.in index ce3f4e1d..9cc36bd1 100644 --- a/WPrefs.app/po/Makefile.in +++ b/WPrefs.app/po/Makefile.in @@ -118,15 +118,15 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: .SUFFIXES: .mo .po $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/po/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/po/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -139,10 +139,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WPrefs.app/po distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WPrefs.app/po/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WPrefs.app/tiff/Makefile.in b/WPrefs.app/tiff/Makefile.in index 8ab33625..966e66e3 100644 --- a/WPrefs.app/tiff/Makefile.in +++ b/WPrefs.app/tiff/Makefile.in @@ -108,14 +108,14 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/tiff/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/tiff/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -147,10 +147,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WPrefs.app/tiff distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WPrefs.app/tiff/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WPrefs.app/xpm/Makefile.in b/WPrefs.app/xpm/Makefile.in index 4cdf6586..bc2053b1 100644 --- a/WPrefs.app/xpm/Makefile.in +++ b/WPrefs.app/xpm/Makefile.in @@ -108,14 +108,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/xpm/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/xpm/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -147,10 +147,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WPrefs.app/xpm distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WPrefs.app/xpm/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Backgrounds/Makefile.in b/WindowMaker/Backgrounds/Makefile.in index 2874bbc7..df3d9c20 100755 --- a/WindowMaker/Backgrounds/Makefile.in +++ b/WindowMaker/Backgrounds/Makefile.in @@ -107,14 +107,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Backgrounds/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Backgrounds/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -146,10 +146,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Backgrounds distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Backgrounds/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Defaults/Makefile.in b/WindowMaker/Defaults/Makefile.in index 6aa75612..b8c5cc8d 100755 --- a/WindowMaker/Defaults/Makefile.in +++ b/WindowMaker/Defaults/Makefile.in @@ -109,14 +109,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Defaults/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Defaults/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -148,10 +148,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Defaults distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Defaults/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/IconSets/Makefile.in b/WindowMaker/IconSets/Makefile.in index 63ce7c88..7a7f31f8 100755 --- a/WindowMaker/IconSets/Makefile.in +++ b/WindowMaker/IconSets/Makefile.in @@ -109,14 +109,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/IconSets/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/IconSets/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -148,10 +148,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/IconSets distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/IconSets/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Icons/Makefile.in b/WindowMaker/Icons/Makefile.in index d3f33e54..23fffdd1 100755 --- a/WindowMaker/Icons/Makefile.in +++ b/WindowMaker/Icons/Makefile.in @@ -108,14 +108,14 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Icons/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Icons/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -147,10 +147,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Icons distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Icons/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Makefile.in b/WindowMaker/Makefile.in index 7b3bd074..3f18c90c 100755 --- a/WindowMaker/Makefile.in +++ b/WindowMaker/Makefile.in @@ -110,14 +110,14 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -235,10 +235,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Pixmaps/Makefile.in b/WindowMaker/Pixmaps/Makefile.in index 11b68c0d..4b67e001 100755 --- a/WindowMaker/Pixmaps/Makefile.in +++ b/WindowMaker/Pixmaps/Makefile.in @@ -108,14 +108,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Pixmaps/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Pixmaps/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -147,10 +147,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Pixmaps distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Pixmaps/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Styles/Makefile.in b/WindowMaker/Styles/Makefile.in index a97f490e..2b546607 100755 --- a/WindowMaker/Styles/Makefile.in +++ b/WindowMaker/Styles/Makefile.in @@ -108,14 +108,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Styles/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Styles/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -147,10 +147,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Styles distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Styles/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Themes/Makefile.in b/WindowMaker/Themes/Makefile.in index 5e16078b..4c4e5f32 100755 --- a/WindowMaker/Themes/Makefile.in +++ b/WindowMaker/Themes/Makefile.in @@ -107,14 +107,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Themes/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Themes/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -146,10 +146,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Themes distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Themes/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 57eb27e9..6959c00d 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -101,14 +101,14 @@ DIST_COMMON = README Makefile.am Makefile.in WindowMaker.spec.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps contrib/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -123,10 +123,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = contrib distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu contrib/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/doc/Makefile.in b/doc/Makefile.in index a1270e04..262b0b0e 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -108,14 +108,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -167,10 +167,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = doc distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu doc/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/po/Makefile.in b/po/Makefile.in index a7248deb..3bb372ea 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -118,15 +118,15 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: .SUFFIXES: .mo .po $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps po/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -139,10 +139,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = po distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu po/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/src/Makefile.in b/src/Makefile.in index 67545184..1b6c8d04 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -145,7 +145,7 @@ wconfig.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(wmaker_SOURCES) OBJECTS = $(wmaker_OBJECTS) @@ -154,7 +154,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -295,7 +295,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/src/WindowMaker.h b/src/WindowMaker.h index fded9b78..d4659f62 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -65,7 +65,6 @@ enum { WMMainMenuLevel = 6, WMOuterSpaceLevel = 7 }; -#define MAX_WINDOW_LEVELS 8 /* * WObjDescriptor will be used by the event dispatcher to diff --git a/src/event.c b/src/event.c index 98f9a15c..4019e7b7 100644 --- a/src/event.c +++ b/src/event.c @@ -1656,16 +1656,18 @@ handleKeyPress(XEvent *event) if (scr->shortcutWindows[index]) { WMBag *list = scr->shortcutWindows[index]; int cw; - int i; int count = WMGetBagItemCount(list); WWindow *twin; + WMBagIterator iter; + WWindow *wwin; wUnselectWindows(scr); cw = scr->current_workspace; - for (i = count-1; i >= 0; i--) { - WWindow *wwin = WMGetFromBag(list, i); - + for (wwin = WMBagLast(list, &iter); + iter != NULL; + wwin = WMBagPrevious(list, &iter)) { + if (count > 1) wWindowChangeWorkspace(wwin, cw); @@ -1676,8 +1678,8 @@ handleKeyPress(XEvent *event) } /* rotate the order of windows, to create a cycling effect */ - twin = WMGetFromBag(list, 0); - WMDeleteFromBag(list, 0); + twin = WMBagFirst(list, &iter); + WMRemoveFromBag(list, twin); WMPutInBag(list, twin); } else if (wwin && ISMAPPED(wwin) && ISFOCUSED(wwin)) { diff --git a/src/moveres.c b/src/moveres.c index a3922119..a66c3404 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -2053,7 +2053,9 @@ wUnselectWindows(WScreen *scr) return; while (WMGetBagItemCount(scr->selected_windows)) { - wwin = WMGetFromBag(scr->selected_windows, 0); + WMBagIterator dummy; + + wwin = WMBagFirst(scr->selected_windows, &dummy); if (wwin->flags.miniaturized && wwin->icon && wwin->icon->selected) wIconSelect(wwin->icon); diff --git a/src/placement.c b/src/placement.c index 7e209e4b..cf3d980d 100644 --- a/src/placement.c +++ b/src/placement.c @@ -139,7 +139,7 @@ PlaceIcon(WScreen *scr, int *x_ret, int *y_ret) int x, y; int isize = wPreferences.icon_size; int done = 0; - int level; + WMBagIterator iter; /* * Find out screen boundaries. @@ -196,9 +196,10 @@ PlaceIcon(WScreen *scr, int *x_ret, int *y_ret) #define INDEX(x,y) (((y)+1)*(sw+2) + (x) + 1) - for (level = MAX_WINDOW_LEVELS-1; level >= WMDesktopLevel; level--) { - obj = scr->stacking_list[level]; - + for (obj = WMBagLast(scr->stacking_list, &iter); + obj != NULL; + obj = WMBagNext(scr->stacking_list, &iter)) { + while (obj) { int x, y; diff --git a/src/screen.c b/src/screen.c index c7b298a2..14d2c400 100644 --- a/src/screen.c +++ b/src/screen.c @@ -653,6 +653,8 @@ wScreenInit(int screen_number) scr = wmalloc(sizeof(WScreen)); memset(scr, 0, sizeof(WScreen)); + + scr->stacking_list = WMCreateTreeBag(); /* initialize globals */ scr->screen = screen_number; diff --git a/src/screen.h b/src/screen.h index d07479cf..d47e1c6d 100644 --- a/src/screen.h +++ b/src/screen.h @@ -105,15 +105,14 @@ typedef struct _WScreen { struct WApplication *wapp_list; /* list of all aplications */ - struct _WCoreWindow *stacking_list[MAX_WINDOW_LEVELS]; - /* array of lists of windows + WMBag *stacking_list; /* bag of lists of windows * in stacking order. - * The array order is in window level - * order and each list on the array + * Indexed by window level + * and each list on the array * is ordered from the topmost to * the lowest window */ -/* int window_level_count[MAX_WINDOW_LEVELS];*/ + int window_count; /* number of windows in window_list */ int workspace_count; /* number of workspaces */ diff --git a/src/session.c b/src/session.c index 5c842d1f..d13fca63 100644 --- a/src/session.c +++ b/src/session.c @@ -125,6 +125,7 @@ static proplist_t sShaded; static proplist_t sMiniaturized; static proplist_t sHidden; static proplist_t sGeometry; +static proplist_t sShortcut; static proplist_t sDock; @@ -147,6 +148,7 @@ make_keys() sHidden = PLMakeString("Hidden"); sGeometry = PLMakeString("Geometry"); sDock = PLMakeString("Dock"); + sShortcut = PLMakeString("Shortcut"); sYes = PLMakeString("Yes"); sNo = PLMakeString("No"); @@ -185,6 +187,24 @@ getBool(proplist_t value) } +static unsigned +getInt(proplist_t value) +{ + char *val; + unsigned n; + + if (!PLIsString(value)) + return 0; + val = PLGetString(value); + if (!val) + return 0; + if (sscanf(val, "%u", &n) != 1) + return 0; + + return n; +} + + static proplist_t makeWindowState(WWindow *wwin, WApplication *wapp) @@ -193,10 +213,12 @@ makeWindowState(WWindow *wwin, WApplication *wapp) Window win; int argc; char **argv; + int i; + unsigned mask; char *class, *instance, *command=NULL, buffer[256]; proplist_t win_state, cmd, name, workspace; proplist_t shaded, miniaturized, hidden, geometry; - proplist_t dock; + proplist_t dock, shortcut; if (wwin->main_window!=None && wwin->main_window!=wwin->client_win) win = wwin->main_window; @@ -231,6 +253,15 @@ makeWindowState(WWindow *wwin, WApplication *wapp) sprintf(buffer, "%ix%i+%i+%i", wwin->client.width, wwin->client.height, wwin->frame_x, wwin->frame_y); geometry = PLMakeString(buffer); + + for (mask = 0, i = 0; i < MAX_WINDOW_SHORTCUTS; i++) { + if (WMGetFirstInBag(scr->shortcutWindows[i], wwin)) { + mask |= 1<app_icon && wapp->app_icon->dock) { int i; char *name; @@ -381,6 +414,7 @@ getWindowState(WScreen *scr, proplist_t win_state) WSavedState *state = wmalloc(sizeof(WSavedState)); proplist_t value; char *tmp; + unsigned mask; int i; memset(state, 0, sizeof(WSavedState)); @@ -406,6 +440,10 @@ getWindowState(WScreen *scr, proplist_t win_state) state->miniaturized = getBool(value); if ((value = PLGetDictionaryEntry(win_state, sHidden))!=NULL) state->hidden = getBool(value); + if ((value = PLGetDictionaryEntry(win_state, sHidden))!=NULL) { + mask = getInt(value); + state->window_shortcuts = mask; + } value = PLGetDictionaryEntry(win_state, sGeometry); if (value && PLIsString(value)) { diff --git a/src/shutdown.c b/src/shutdown.c index 774ce173..7c14b869 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -161,7 +161,8 @@ Shutdown(WShutdownMode mode) void RestoreDesktop(WScreen *scr) { - int i; + WMBagIterator iter; + WCoreWindow *core; if (scr->helper_pid > 0) { kill(scr->helper_pid, SIGTERM); @@ -172,14 +173,12 @@ RestoreDesktop(WScreen *scr) wDestroyInspectorPanels(); /* reparent windows back to the root window, keeping the stacking order */ - for (i=0; istacking_list, &iter); + core != NULL; + core = WMBagNext(scr->stacking_list, &iter)) { + WCoreWindow *next; WWindow *wwin; - - if (!scr->stacking_list[i]) - continue; - - core = scr->stacking_list[i]; + /* go to the end of the list */ while (core->stacking->under) core = core->stacking->under; diff --git a/src/stacking.c b/src/stacking.c index e7c90cad..4ac94341 100644 --- a/src/stacking.c +++ b/src/stacking.c @@ -45,6 +45,9 @@ extern XContext wStackContext; extern WPreferences wPreferences; + + + /* *---------------------------------------------------------------------- * RemakeStackList-- @@ -65,19 +68,16 @@ RemakeStackList(WScreen *scr) unsigned int nwindows; Window junkr, junkp; WCoreWindow *frame; - WCoreWindow *onbotw[MAX_WINDOW_LEVELS]; + WCoreWindow *tmp; int level; int i, c; - + if (!XQueryTree(dpy, scr->root_win, &junkr, &junkp, &windows, &nwindows)) { wwarning(_("could not get window list!!")); return; } else { - for (i=0; istacking_list[i] = NULL; - onbotw[i] = NULL; -/* scr->window_level_count[i] = 0;*/ - } + WMEmptyBag(scr->stacking_list); + /* verify list integrity */ c=0; for (i=0; istacking->window_level; - if (onbotw[level]) - onbotw[level]->stacking->above = frame; - frame->stacking->under = onbotw[level]; + tmp = WMGetFromBag(scr->stacking_list, level); + if (tmp) + tmp->stacking->above = frame; + frame->stacking->under = tmp; frame->stacking->above = NULL; - onbotw[level] = frame; -/* scr->window_level_count[level]++;*/ + WMSetInBag(scr->stacking_list, level, frame); } XFree(windows); #ifdef DEBUG @@ -103,12 +103,6 @@ RemakeStackList(WScreen *scr) #endif scr->window_count = c; } - /* now, just concatenate the lists */ - for (i=0; istacking_list[i] = onbotw[i]; - if (onbotw[i]) - onbotw[i]->stacking->above = NULL; - } CommitStacking(scr); } @@ -128,15 +122,16 @@ void CommitStacking(WScreen *scr) { WCoreWindow *tmp; - int nwindows; + int nwindows, i; Window *windows; - int i, level; + WMBagIterator iter; nwindows = scr->window_count; windows = wmalloc(sizeof(Window)*nwindows); - i=0; - for (level=MAX_WINDOW_LEVELS-1; level>=0; level--) { - tmp = scr->stacking_list[level]; + + for (tmp = WMBagLast(scr->stacking_list, &iter), i = 0; + iter != NULL; + WMBagNext(scr->stacking_list, &iter)) { while (tmp) { #ifdef DEBUG if (i>=nwindows) { @@ -203,7 +198,7 @@ wRaiseFrame(WCoreWindow *frame) { WCoreWindow *wlist = frame, *wlist_above; int level = frame->stacking->window_level; - int i; + WScreen *scr = frame->screen_ptr; /* already on top */ if (frame->stacking->above == NULL) { @@ -211,7 +206,7 @@ wRaiseFrame(WCoreWindow *frame) } /* insert on top of other windows */ -#if 1 + while (wlist) { if (wlist == (wlist_above = wlist->stacking->above)) { wwarning("You just found a bug in wmaker. Please try to figure what type of raising/lowering operations you did with which applications and report. Please give complete information about how to reproduce it."); @@ -220,32 +215,30 @@ wRaiseFrame(WCoreWindow *frame) wlist=wlist_above; } } -#else - while (wlist) - wlist = wlist->stacking->above; -#endif + /* window is inserted before the point found */ if (wlist==NULL) { /* top most window (last on the list) */ if (frame->stacking->under) - frame->stacking->under->stacking->above = frame->stacking->above; + frame->stacking->under->stacking->above = frame->stacking->above; if (frame->stacking->above) - frame->stacking->above->stacking->under = frame->stacking->under; + frame->stacking->above->stacking->under = frame->stacking->under; frame->stacking->above = NULL; - frame->stacking->under = frame->screen_ptr->stacking_list[level]; - frame->screen_ptr->stacking_list[level]->stacking->above=frame; - frame->screen_ptr->stacking_list[level] = frame; + frame->stacking->under = WMGetFromBag(scr->stacking_list, level); + frame->stacking->under->stacking->above = frame; + WMSetInBag(scr->stacking_list, level, frame); + } else if (frame!=wlist) { if (frame->stacking->under) - frame->stacking->under->stacking->above = frame->stacking->above; + frame->stacking->under->stacking->above = frame->stacking->above; if (frame->stacking->above) - frame->stacking->above->stacking->under = frame->stacking->under; + frame->stacking->above->stacking->under = frame->stacking->under; frame->stacking->above = wlist; frame->stacking->under = wlist->stacking->under; if (wlist->stacking->under) - wlist->stacking->under->stacking->above = frame; + wlist->stacking->under->stacking->above = frame; wlist->stacking->under = frame; } #ifdef removed @@ -254,7 +247,7 @@ wRaiseFrame(WCoreWindow *frame) { /* raise transients under us from bottom to top * so that the order is kept */ - again: + again: wlist = frame->stacking->under; while (wlist && wlist->stacking->under) wlist = wlist->stacking->under; @@ -281,17 +274,18 @@ wRaiseFrame(WCoreWindow *frame) /* try to optimize things a little */ if (frame->stacking->above == NULL) { WCoreWindow *above=NULL; - - for (i=level+1; iscreen_ptr->stacking_list[i]!=NULL) { - /* can't optimize */ - above = frame->screen_ptr->stacking_list[i]; - while (above->stacking->under) - above = above->stacking->under; - break; - } + WMBagIterator iter; + + for (above = WMBagIteratorAtIndex(scr->stacking_list, level+1, &iter); + above != NULL; + above = WMBagNext(scr->stacking_list, &iter)) { + + /* can't optimize */ + while (above->stacking->under) + above = above->stacking->under; + break; } - if (!above) { + if (above == NULL) { XRaiseWindow(dpy, frame->window); } else { moveFrameToUnder(above, frame); @@ -303,12 +297,12 @@ wRaiseFrame(WCoreWindow *frame) { WWindow *wwin = wWindowFor(frame->window); - if (wwin) + if (wwin != NULL) wKWMSendEventMessage(wwin, WKWMRaiseWindow); } #endif #ifdef VIRTUAL_DESKTOP - wWorkspaceRaiseEdge(frame->screen_ptr); + wWorkspaceRaiseEdge(scr); #endif } @@ -328,7 +322,7 @@ wRaiseLowerFrame(WCoreWindow *frame) while (scan) { if (scan->descriptor.parent_type == WCLASS_WINDOW) { - WWindow *scan_wwin = (WWindow*) scan->descriptor.parent; + WWindow *scan_wwin = (WWindow*)scan->descriptor.parent; if (wWindowObscuresWindow(scan_wwin, frame_wwin) && scan_wwin->flags.mapped) { @@ -350,13 +344,12 @@ wRaiseLowerFrame(WCoreWindow *frame) void wLowerFrame(WCoreWindow *frame) { - WScreen *scr=frame->screen_ptr; + WScreen *scr = frame->screen_ptr; WCoreWindow *prev, *wlist=frame; int level = frame->stacking->window_level; - int i; /* already in bottom */ - if (wlist->stacking->under==NULL) { + if (wlist->stacking->under == NULL) { return; } #ifdef removed @@ -371,17 +364,17 @@ wLowerFrame(WCoreWindow *frame) #endif prev = wlist; /* remove from the list */ - if (scr->stacking_list[level] == frame) { + if (WMGetFromBag(scr->stacking_list, level) == frame) { /* it was the top window */ - scr->stacking_list[level] = frame->stacking->under; - scr->stacking_list[level]->stacking->above = NULL; + WMSetInBag(scr->stacking_list, level, frame->stacking->under); + frame->stacking->under->stacking->above = NULL; } else { if (frame->stacking->under) - frame->stacking->under->stacking->above = frame->stacking->above; + frame->stacking->under->stacking->above = frame->stacking->above; if (frame->stacking->above) - frame->stacking->above->stacking->under = frame->stacking->under; + frame->stacking->above->stacking->under = frame->stacking->under; } - wlist = scr->stacking_list[level]; + wlist = WMGetFromBag(scr->stacking_list, level); /* look for place to put this window */ #ifdef removed if (wPreferences.on_top_transients) @@ -410,20 +403,22 @@ wLowerFrame(WCoreWindow *frame) frame->stacking->above = wlist; frame->stacking->under = wlist->stacking->under; if (wlist->stacking->under) - wlist->stacking->under->stacking->above = frame; + wlist->stacking->under->stacking->above = frame; wlist->stacking->under = frame; /* try to optimize things a little */ if (frame->stacking->above == NULL) { WCoreWindow *above = NULL; - for (i=level-1; i>=0; i--) { - if (scr->stacking_list[i]!=NULL) { - /* can't optimize */ - above = scr->stacking_list[i]; - while (above->stacking->under) - above = above->stacking->under; - break; - } + WMBagIterator iter; + + for (above = WMBagIteratorAtIndex(scr->stacking_list, level-1, &iter); + above != NULL; + above = WMBagPrevious(scr->stacking_list, &iter)) { + + /* can't optimize */ + while (above->stacking->under) + above = above->stacking->under; + break; } if (!above) { XLowerWindow(dpy, frame->window); @@ -462,16 +457,16 @@ AddToStackList(WCoreWindow *frame) { WCoreWindow *prev, *tmpw, *wlist; int index = frame->stacking->window_level; + WScreen *scr = frame->screen_ptr; frame->screen_ptr->window_count++; -/* frame->screen_ptr->window_level_count[index]++;*/ XSaveContext(dpy, frame->window, wStackContext, (XPointer)frame); - tmpw = frame->screen_ptr->stacking_list[index]; + tmpw = WMGetFromBag(scr->stacking_list, index); if (!tmpw) { - frame->screen_ptr->stacking_list[index] = frame; + WMSetInBag(scr->stacking_list, index, frame); frame->stacking->above = NULL; frame->stacking->under = NULL; - CommitStacking(frame->screen_ptr); + CommitStacking(scr); return; } prev = tmpw; @@ -482,7 +477,7 @@ AddToStackList(WCoreWindow *frame) { WCoreWindow *trans = NULL; - wlist = frame->screen_ptr->stacking_list[index]; + wlist = WMGetFromBag(scr->stacking_list, index); while (wlist) { if (wlist->stacking->child_of == frame) trans = wlist; @@ -499,7 +494,7 @@ AddToStackList(WCoreWindow *frame) } else { frame->stacking->under = tmpw; tmpw->stacking->above = frame; - frame->screen_ptr->stacking_list[index] = frame; + WMSetInBag(scr->stacking_list, index, frame); } } #ifdef removed @@ -508,10 +503,10 @@ AddToStackList(WCoreWindow *frame) frame->stacking->above = NULL; frame->stacking->under = tmpw; tmpw->stacking->above = frame; - frame->screen_ptr->stacking_list[index] = frame; + WMSetInBag(scr->stacking_list, index, frame); } #endif - CommitStacking(frame->screen_ptr); + CommitStacking(scr); } @@ -532,6 +527,7 @@ void MoveInStackListAbove(WCoreWindow *next, WCoreWindow *frame) { WCoreWindow *tmpw; + WScreen *scr = frame->screen_ptr; int index; if (!next || frame->stacking->under == next) @@ -542,9 +538,9 @@ MoveInStackListAbove(WCoreWindow *next, WCoreWindow *frame) index = frame->stacking->window_level; - tmpw = frame->screen_ptr->stacking_list[index]; + tmpw = WMGetFromBag(scr->stacking_list, index); if (tmpw == frame) - frame->screen_ptr->stacking_list[index] = frame->stacking->under; + WMSetInBag(scr->stacking_list, index, frame->stacking->under); if (frame->stacking->under) frame->stacking->under->stacking->above = frame->stacking->above; if (frame->stacking->above) @@ -555,23 +551,23 @@ MoveInStackListAbove(WCoreWindow *next, WCoreWindow *frame) frame->stacking->above = next->stacking->above; next->stacking->above = frame; if (tmpw == next) - frame->screen_ptr->stacking_list[index] = frame; + WMSetInBag(scr->stacking_list, index, frame); /* try to optimize things a little */ if (frame->stacking->above == NULL) { - WCoreWindow *above=NULL; - int i; - - for (i=index+1; iscreen_ptr->stacking_list[i]!=NULL) { - /* can't optimize */ - above = frame->screen_ptr->stacking_list[i]; - while (above->stacking->under) - above = above->stacking->under; - break; - } + WCoreWindow *above = NULL; + WMBagIterator iter; + + for (above = WMBagIteratorAtIndex(scr->stacking_list, index+1, &iter); + above != NULL; + above = WMBagNext(scr->stacking_list, &iter)) { + + /* can't optimize */ + while (above->stacking->under) + above = above->stacking->under; + break; } - if (!above) { + if (above == NULL) { XRaiseWindow(dpy, frame->window); } else { moveFrameToUnder(above, frame); @@ -600,6 +596,7 @@ MoveInStackListUnder(WCoreWindow *prev, WCoreWindow *frame) { WCoreWindow *tmpw; int index; + WScreen *scr = frame->screen_ptr; if (!prev || frame->stacking->above == prev) return; @@ -609,9 +606,9 @@ MoveInStackListUnder(WCoreWindow *prev, WCoreWindow *frame) index = frame->stacking->window_level; - tmpw = frame->screen_ptr->stacking_list[index]; + tmpw = WMGetFromBag(scr->stacking_list, index); if (tmpw == frame) - frame->screen_ptr->stacking_list[index] = frame->stacking->under; + WMSetInBag(scr->stacking_list, index, frame->stacking->under); if (frame->stacking->under) frame->stacking->under->stacking->above = frame->stacking->above; if (frame->stacking->above) @@ -638,14 +635,14 @@ RemoveFromStackList(WCoreWindow *frame) } /* remove from the window stack list */ if (frame->stacking->under) - frame->stacking->under->stacking->above = frame->stacking->above; + frame->stacking->under->stacking->above = frame->stacking->above; if (frame->stacking->above) - frame->stacking->above->stacking->under = frame->stacking->under; + frame->stacking->above->stacking->under = frame->stacking->under; else /* this was the first window on the list */ - frame->screen_ptr->stacking_list[index] = frame->stacking->under; + WMSetInBag(frame->screen_ptr->stacking_list, index, + frame->stacking->under); frame->screen_ptr->window_count--; -/* frame->screen_ptr->window_level_count[index]--;*/ } diff --git a/src/window.c b/src/window.c index a824002a..c347dbcb 100644 --- a/src/window.c +++ b/src/window.c @@ -834,7 +834,7 @@ wManageWindow(WScreen *scr, Window window) wwin->flags.miniaturized = wstate->miniaturized; workspace = wstate->workspace; - if (scr->flags.startup && wstate->window_shortcuts >= 0) { + if (scr->flags.startup && wstate->window_shortcuts > 0) { int i; for (i = 0; i < MAX_WINDOW_SHORTCUTS; i++) { diff --git a/test/Makefile.in b/test/Makefile.in index f3f9ff56..77cf219a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -129,7 +129,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(wtest_SOURCES) OBJECTS = $(wtest_OBJECTS) @@ -138,7 +138,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -233,7 +233,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/util/Makefile.in b/util/Makefile.in index 92d6f2b9..69b9d4f7 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -191,7 +191,7 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(wxcopy_SOURCES) $(wxpaste_SOURCES) $(wdwrite_SOURCES) $(getstyle_SOURCES) $(setstyle_SOURCES) $(seticons_SOURCES) $(geticonset_SOURCES) $(wmsetbg_SOURCES) OBJECTS = $(wxcopy_OBJECTS) $(wxpaste_OBJECTS) $(wdwrite_OBJECTS) $(getstyle_OBJECTS) $(setstyle_OBJECTS) $(seticons_OBJECTS) $(geticonset_OBJECTS) $(wmsetbg_OBJECTS) @@ -200,7 +200,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps util/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -358,7 +358,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/wmlib/Makefile.in b/wmlib/Makefile.in index 02f9c38f..cca59ee8 100644 --- a/wmlib/Makefile.in +++ b/wmlib/Makefile.in @@ -130,7 +130,7 @@ DIST_COMMON = COPYING.LIB Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(libWMaker_a_SOURCES) OBJECTS = $(libWMaker_a_OBJECTS) @@ -139,7 +139,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps wmlib/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu wmlib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -273,7 +273,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/wrlib/Makefile.in b/wrlib/Makefile.in index 86a6153e..6527396f 100644 --- a/wrlib/Makefile.in +++ b/wrlib/Makefile.in @@ -180,7 +180,7 @@ Makefile.in NEWS TODO alloca.c configure.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(libwraster_la_SOURCES) $(testgrad_SOURCES) $(testdraw_SOURCES) $(view_SOURCES) $(testrot_SOURCES) OBJECTS = $(libwraster_la_OBJECTS) $(testgrad_OBJECTS) $(testdraw_OBJECTS) $(view_OBJECTS) $(testrot_OBJECTS) @@ -189,7 +189,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps wrlib/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu wrlib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -358,7 +358,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ -- 2.11.4.GIT