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

updated code to use new bags

arbitrary window levels
This commit is contained in:
kojima
2000-03-28 02:48:32 +00:00
parent 6672180d77
commit f5177e67d5
37 changed files with 482 additions and 214 deletions

45
COPYING.WTFPL Normal file
View File

@@ -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.

View File

@@ -51,7 +51,11 @@ Changes since version 0.61.1:
- fixed crash bug with broken java implementations (Miguel Covarrubias
<mcovarr@tigr.org>)
- 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:

View File

@@ -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 \

7
README
View File

@@ -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.

1
TODO
View File

@@ -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:
===============

View File

@@ -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 \

View File

@@ -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;

View File

@@ -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 */

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -65,7 +65,6 @@ enum {
WMMainMenuLevel = 6,
WMOuterSpaceLevel = 7
};
#define MAX_WINDOW_LEVELS 8
/*
* WObjDescriptor will be used by the event dispatcher to

View File

@@ -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)) {

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 */

View File

@@ -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<<i;
}
}
sprintf(buffer, "%u", mask);
shortcut = PLMakeString(buffer);
win_state = PLMakeDictionaryFromEntries(sName, name,
sCommand, cmd,
@@ -238,6 +269,7 @@ makeWindowState(WWindow *wwin, WApplication *wapp)
sShaded, shaded,
sMiniaturized, miniaturized,
sHidden, hidden,
sShortcut, shortcut,
sGeometry, geometry,
NULL);
@@ -245,6 +277,7 @@ makeWindowState(WWindow *wwin, WApplication *wapp)
PLRelease(cmd);
PLRelease(workspace);
PLRelease(geometry);
PLRelease(shortcut);
if (wapp && wapp->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)) {

View File

@@ -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; i<MAX_WINDOW_LEVELS; i++) {
WCoreWindow *core, *next;
for (core = WMBagFirst(scr->stacking_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;

View File

@@ -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; i<MAX_WINDOW_LEVELS; i++) {
scr->stacking_list[i] = NULL;
onbotw[i] = NULL;
/* scr->window_level_count[i] = 0;*/
}
WMEmptyBag(scr->stacking_list);
/* verify list integrity */
c=0;
for (i=0; i<nwindows; i++) {
@@ -88,12 +88,12 @@ RemakeStackList(WScreen *scr)
if (!frame) continue;
c++;
level = frame->stacking->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; i<MAX_WINDOW_LEVELS; i++) {
scr->stacking_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;
WMBagIterator iter;
for (i=level+1; i<MAX_WINDOW_LEVELS; i++) {
if (frame->screen_ptr->stacking_list[i]!=NULL) {
/* can't optimize */
above = frame->screen_ptr->stacking_list[i];
while (above->stacking->under)
above = above->stacking->under;
break;
}
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;
WCoreWindow *above = NULL;
WMBagIterator iter;
for (i=index+1; i<MAX_WINDOW_LEVELS; i++) {
if (frame->screen_ptr->stacking_list[i]!=NULL) {
/* can't optimize */
above = frame->screen_ptr->stacking_list[i];
while (above->stacking->under)
above = above->stacking->under;
break;
}
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]--;*/
}

View File

@@ -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++) {

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \