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

Bug fixes for 0.20.3 pre-release 2

This commit is contained in:
dan
1998-11-03 12:53:26 +00:00
parent abde3e0c4e
commit 59eb947539
80 changed files with 1280 additions and 585 deletions

15
AUTHORS
View File

@@ -1,4 +1,4 @@
Information about locale translators is at src/po/README and
Bjoern Giesler <giesler@ira.uka.de>
Library/WindowMaker/README
Many thanks to the following people who have contributed
@@ -140,7 +140,8 @@ Initial code for clip's collapse feature.
Ture Pelsson <ture@lysator.liu.se>
various portability fixes, replaced busy wait with select() in event
handling code, fixed problem with some misbehaved kids after a fork().
handling code, fixed problem with some misbehaved kids after a fork(),
some other bug fixes
Toby Sargeant <?>
menu format converter
@@ -155,7 +156,7 @@ Chong Shang Shan <chongsha@sps.nus.edu.sg>
flipping iconification animation
Phillip Smith <teknix@alloy.net>
FTP and WWW site provider/maintainer
FTP, WWW, mailing list site provider/maintainer (Net logistics)
Lauri Tarkkala <ltarkkal@cs.hut.fi>
SIGHUP unblock bug fix
@@ -164,10 +165,10 @@ Sam Varner <varner@nmr.physics.wm.edu>
many fixes and enhancements for move, resize and window placement code.
Marco van Hylckama Vlieg <fatal@global.uibk.ac.at>
house icon for WINGs file dialogs, defaullAppIcon and Clip xpm icon
house icon for WINGs file dialogs, defaultAppIcon and Clip xpm icon
David Wang <dwang@cisco.com>
edge resistance
edge resistance, 8bpp balloon bug fix, other 8bpp related fixes
Yoav Yerushalmi <yoav@mit.edu>
Fixed -visualid for screens that can do multiple depths. Another fix in
@@ -177,10 +178,12 @@ FRBall <frb@umr.edu>
dgradient fix
"]d" <mhz@gpf.or.th>
Window list menu miniaturized/hidden hints, XDE support
Window list menu miniaturized/hidden hints, XDE support, XKB lock
language status
Trae Mc Combs <x@themes.org>
BlueWaves.jpeg background image in BlueWaves theme.
And a special thanks to Martin Eskildsen for giving me his
copy of NEXTSTEP :-)

View File

@@ -1,3 +1,28 @@
Changes since version 0.20.2:
.............................
- hysteresis for menu item selection (delayed selection for selecting
submenu items)
- window shortcuts
- removed Hide Others from window commands menu
- window commands menu will close when the window for it is closed
- made shade not set the Iconic state
- fixed bug in miniaturizing atribute panel
- made frame rectangles be more visible in PseudoColor (8bpp)
- fixed bug for 64bit machines
- added support for ICCCM 2.0 WM_COLORMAP_NOTIFY message
- fixed bug for apps that put strings with . in WM_CLASS
- added handling for reparented client windows
- fixed bug with window positioning
- fixed cascade window placement to account for dock
- added modelock stuff
- added X include path in gfx header when configure searches for headers
- fixed bug in window positioning by clients
- added run-time test for shared pixmap support on server
- changed order of link flags in Makefiles
- fixed problem with random window placement
- fixed multiple window selection for multiheads
Changes since version 0.20.1:
.............................

48
INSTALL
View File

@@ -24,7 +24,7 @@ SUPPORTED PLATFORMS
- AIX 5.3
- DEC Alpha/Digital UNIX 4.x
- XFree86 / OS/2
- Corel Netwinder
- Corel NetWinder
Patches to make it work on other platforms are welcome.
@@ -32,7 +32,7 @@ Patches to make it work on other platforms are welcome.
REQUIREMENTS:
=============
The following software is required to use Window Maker
The following software is required to use Window Maker:
- X11R6.x
Window Maker can be compiled in older versions of X, like X11R5
@@ -41,11 +41,27 @@ The following software is required to use Window Maker
trouble using the dock. Upgrading the client libraries (Xlib, Xt etc)
will help if you can't upgrade the server.
The following is required to build Window Maker:
If you will build Window Maker, make sure you have gcc and the X header files
installed. Specially for newbie Linux users: you must install all X development
packages and the gcc suite. Otherwise you won't be able to build any X program,
including Window Maker.
- Basic obvious stuff
If you will build Window Maker, make sure you have gcc (or some
other ANSI C compiler) and the X header files installed. Specially
for newbie Linux users: you must install all X development packages
and the gcc suite. Otherwise you won't be able to build any X
program, including Window Maker.
- autoconf and automake
autoconf and automake are not required, but if you have them
installed, make sure you have autoconf 2.12 and automake 1.3 or
newer. If you have an older version, disable them by temporarily
renaming them to something else or uninstalling them from your
system.
- lex (or flex) and yacc (or bison)
These are used by libPropList. lex is actually not needed since
it's output file is included, but either me or automake is stupid,
causing the configure script for libPropList to simply abort for no
convincent reason if lex is not found.
OPTIONAL:
@@ -128,6 +144,9 @@ To get a list of other options, run ./configure --help
--disable-shm disable use of the MIT shared memory extension. This will
slow down texture generation.
--enable-modelock XKB language status lock support. If you don't know
what it is you probably don't need it.
PLATFORM SPECIFIC NOTES:
@@ -136,9 +155,8 @@ PLATFORM SPECIFIC NOTES:
CFLAGS="-belf -DANSICPP" ./configure
- SunOS, Solaris
If you have gcc installed, after running configure, edit
src/config.h and change the #define CPP_PATH line to
#define CPP_PATH "gcc -E -x c"
If you have gcc installed, run configure as:
CPP_PATH="gcc -E -x c" ./configure
Sun's cpp lacks some features needed by Window Maker and it can
cause problems when parsing the config files.
You also might need to use the --with-gfx-libs and --with-gfx-incs
@@ -181,15 +199,6 @@ You can get the file at ftp://ftp.windowmaker.org. This file is optional
and only have a few icons.
autoconf and automake
---------------------
autoconf and automake are not required, but if you have them installed,
make sure you have autoconf 2.12 and automake 1.3 or newer. If you have
an older version, disable them by temporarily renaming them to something
else or uninstalling them from your system.
Build Window Maker
------------------
For a quick start, type the following in your shell prompt:
@@ -351,6 +360,9 @@ If you're not sure, try renaming ~/GNUstep to ~/GNUtmp and then run wmaker.inst
not located in /lib/cpp, edit src/config.h and correct the path in
CPP_PATH.
== checking lex output file root... configure: error: cannot find output from true; giving up
* Read the REQUIREMENTS section of this file.
LOCALES/INTERNATIONALIZATION

33
Install
View File

@@ -10,6 +10,7 @@ if test "$NLSDIR" = ""; then
export NLSDIR;NLSDIR="/usr/lib/locale"
fi
OPTIONS=""
PREFIX="/usr/local"
@@ -20,9 +21,7 @@ perai() {
perform() {
result=
eval $*
if [ "$result" != 0 ]; then
if ! $* ; then
echo
echo "Window Maker installation failed or aborted by user."
exit 1
@@ -57,18 +56,6 @@ echo
echo "Option Selection"
echo "================"
######################## Sound
echo
echo "Do you want sound support? Note that you need a module distributed"
echo "separately to make it work. You can get it at:"
echo "http://www.frontiernet.net/~southgat/wmsound"
echo -n "<y/n> [y] "
read SFX
if [ "x$SFX" = "x" -o "$SFX" = "y" -o "$SFX" = "Y" ]; then
OPTIONS="$OPTIONS --enable-sound"
fi
######################## NLS
echo
@@ -88,10 +75,10 @@ if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
ALL_LINGUAS="$ALL_LINGUAS $lcode"
echo "$lcode $lname"
done
echo "Type in the locales you want [$ALL_LINGUAS]"
echo "Type in the locales you want (all will install everything) [none]"
read foo
if test "x$foo" = "x"; then
LINGUAS=$ALL_LINGUAS
if test "$foo" = "all"; then
LINGUAS="$ALL_LINGUAS"
else
LINGUAS="$foo"
fi
@@ -173,11 +160,15 @@ echo "--------------------------"
if [ `uname -s` = "SCO_SV" ]; then
echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
perform CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS
CFLAGS="$CFLAGS -belf -DANSICPP"
perform ./configure $OPTIONS
else
echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
perform CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS
CFLAGS="$CFLAGS $GCCFLAGS"
perform ./configure $OPTIONS
fi
@@ -185,7 +176,7 @@ fi
echo "-------------------------"
echo "Compiling Window Maker..."
echo "-------------------------"
perform (cd src; make clean)
(cd src; perform make clean)
perform make
echo "--------------------------"

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

37
NEWS
View File

@@ -2,6 +2,43 @@
NEWS for veteran Window Maker users
-----------------------------------
--- 0.20.3
Hysteresis for menu item selection
----------------------------------
Hopefully it's intelligent enough, so you won't notice it.
In case you want to know what's it, it's equivalent to that
(insanely long) 2 second delay present in that Windoze95 menu,
but more usefull than annoying (I hope :). To see it, do the following
with your current wmaker version and later with 0.20.3:
- open the apps menu and stick it
- click in the item for the "Workspaces" submenu and hold
- drag the mouse to the 4th or bigger entry (like "Workspace 4") in a
straight line, trying to select the target item before the submenu
is unmapped when you dragged over other items in the main menu
Window Shortcuts
----------------
Window shortcuts are shortcuts to arbitrary windows. You can make up to 4
shortcuts. To assign a previously bound shortcut to a window use the "Select
Shortcut" submenu in the window commands menu. If the shortcut is not yet
assigned for any window, you can hit the shortcut to assign it to the active
window. The shortcut will do the same as clicking in an entry in the window
list menu. The keys for the shortcuts are defined in the ~/G/D/WindowMaker
file or in WPrefs.app
Option names are:
WindowShortcut1Key through WindowShortcut4Key
--- 0.20.2

49
README
View File

@@ -1,21 +1,35 @@
Window Maker X11 Window Manager
Window Maker X11 Window Manager
<http://windowmaker.org>
<ftp://ftp.windowmaker.org>
<http://windowmaker.org>
<ftp://ftp.windowmaker.org>
Alfredo K. Kojima
<kojima@windowmaker.org>
Alfredo K. Kojima
Dan Pascu
<dan@windowmaker.org>
Dan Pascu
Matthew Hawkins
<matt@windowmaker.org>
Matthew Hawkins
Congratulations! You have purchased an extremely fine
device that would give you thousands of years of trouble-free
service, except that you undoubtably will destroy it via some
typical bonehead consumer maneuver. Which is why we ask you
to PLEASE FOR GOD'S SAKE READ THIS OWNER'S MANUAL CAREFULLY
BEFORE YOU UNPACK THE DEVICE. YOU ALREADY UNPACKED IT, DIDN'T
YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED IT ON AND
FIDDLED WITH THE KNOBS, AND NOW YOUR CHILD, THE SAME CHILD WHO
ONCE SHOVED A POLISH SAUSAGE INTO YOUR VIDEOCASSETTE RECORDER
AND SET IT ON "FAST FORWARD", THIS CHILD ALSO IS FIDDLING
WITH THE KNOBS, RIGHT? AND YOU'RE JUST NOW STARTING TO READ
THE INSTRUCTIONS, RIGHT??? WE MIGHT AS WELL JUST BREAK THESE
DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU
KNOW THAT?
-- Dave Barry, "Read This First!"
Description
===========
@@ -172,14 +186,14 @@ but Window Maker will not have such feature. The XKB extension supports
mouse simulation from the keyboard, in a much more powerfull fashion than
any simulation done by a window manager.
To enable it, hit the Control+Shift+NumLock key combination. You should
hear the speaker beeping. To disable it, do the same thing.
To enable it, hit the Control+Shift+NumLock or Shift+NumLock key combination.
You should hear the speaker beeping. To disable it, do the same thing.
To control the mouse the numeric keypad is used as follows:
- 4 (left arrow), 7 (Home), 8 (up arrow), 9 (PgUp), 6 (right arrow),
3 (PgDn), 2 (down arrow) and 1 (End) move the mouse to the corresponding
direction;
- holding one of the above keys and the holding the 5 key will move the
- holding one of the above keys and then holding the 5 key will move the
pointer faster;
- / will select the first mouse button (left button);
- * will select the second mouse button (middle button);
@@ -246,6 +260,15 @@ NeXT, OpenStep and NEXTSTEP are a trademarks of NeXT Computer, Inc.
Authors
=======
Alfredo K. Kojima <kojima@windowmaker.org>
Dan Pascu <dan@windowmaker.org>
Matt Hawkins <matt@windowmaker.org>
Please don't ask us questions before reading the documentation (esp. the
FAQ, this file and INSTALL files) and about "cool" things you see in
people's desktop screenshots.
The AUTHORS file contains a list of the people who have contributed to the
project. The name of people who have helped with localization (translation)
can be found in po/README and Window Maker/README
@@ -254,6 +277,8 @@ If you have any comments, fixes and bug reports (filled BUGFORMs) send them
to developers@windowmaker.org
Musicware
=========

15
TODO
View File

@@ -8,14 +8,14 @@ Do ASAP:
- differential update of appmenu
- make unhide app map windows in the same stacking order they were before
hiding
- blink border of clients with UrgencyHint set between red and black
Need to do:
===========
- fix and include the windoze cycle window patch
- support for X11R6.4 extension for getting extra visual info in wrlib's
automatic best context guessing
- ICCCM 2.0 stuff (although nobody is 2.0 compliant, AFAIK. Not even twm)
- rewrite menu traversal code
- histeresys in menu item selection
- docklet to control AccessX (keyboard accessibility) functions
- rewrite all redundant stuff to use WINGs
- resizebartexture option
@@ -49,3 +49,14 @@ considered, but don't hold your breath.
- anything that requires the mouse pointer to be jumped by WindowMaker to
somewhere. This is *terrible* behaviour. And it's not just IMO.
- ICCCM 2.0: ICCCM 2.0 (not 1.0, which is what everybody supports so so) is
a relatively new standard and nobody, AFAIK, complies with it (not even
twm as people tend to think). It has some neat things, but many of the new
stuff is really weird and tricky to implement, not to say unworthy (read the
specs and you'll see). This is not bad, since I think it is very unlikely
that a client that requires it exists... Anyway, if we get an "official"
sample implementation (twm?) it might be supported. Maybe dtwm supports
it? I dont know...

View File

@@ -5,7 +5,8 @@ AUTOMAKE_OPTIONS = no-dependencies
SUBDIRS = Resources
LIBLIST= -L$(top_builddir)/wrlib -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ \
LIBLIST= -L$(top_builddir)/wrlib -lwraster\
@GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ \
-lm -L$(top_builddir)/libPropList -lPropList
@@ -84,7 +85,7 @@ libWINGs_a_SOURCES = \
## Find a better way than $(GFXFLAGS) to inform widgets.c wich of
## tiff or xpm images should be used
INCLUDES = @XCFLAGS@ -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" $(GFXFLAGS) -DDEBUG \
-I$(top_srcdir)/libPropList
-I$(top_srcdir)/libPropList @XCFLAGS@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@
@@ -93,7 +94,8 @@ AUTOMAKE_OPTIONS = no-dependencies
SUBDIRS = Resources
LIBLIST= -L$(top_builddir)/wrlib -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ \
LIBLIST= -L$(top_builddir)/wrlib -lwraster\
@GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ \
-lm -L$(top_builddir)/libPropList -lPropList
lib_LIBRARIES = libWINGs.a
@@ -165,9 +167,9 @@ libWINGs_a_SOURCES = \
memory.c \
usleep.c
INCLUDES = @XCFLAGS@ -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" $(GFXFLAGS) -DDEBUG \
-I$(top_srcdir)/libPropList
-I$(top_srcdir)/libPropList @XCFLAGS@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../src/config.h
CONFIG_CLEAN_FILES =

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -1,8 +1,10 @@
/*
* Demo user widget for WINGs.
* Demo user widget for WINGs
*
*
* Copyright (c) 1998 Alfredo K. Kojima
* Author: Alfredo K. Kojima
*
* This file is in the public domain.
*
*/

View File

@@ -387,6 +387,10 @@ delayUntilNextTimerEvent(struct timeval *delay)
} else {
delay->tv_sec = timerHandler->when.tv_sec - now.tv_sec;
delay->tv_usec = timerHandler->when.tv_usec - now.tv_usec;
if (delay->tv_usec < 0) {
delay->tv_usec += 1000000;
delay->tv_sec--;
}
}
}

View File

@@ -347,8 +347,7 @@ renderPixmap(W_Screen *screen, Pixmap d, Pixmap mask, char **data,
if (mask)
XSetForeground(screen->display, screen->monoGC,
W_PIXEL(screen->black));
XSetForeground(screen->display, screen->monoGC, 0);
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
@@ -394,7 +393,7 @@ makePixmap(W_Screen *sPtr, char **data, int width, int height, int masked)
if (masked) {
mask = XCreatePixmap(sPtr->display, W_DRAWABLE(sPtr), width, height, 1);
XSetForeground(sPtr->display, sPtr->monoGC, W_PIXEL(sPtr->white));
XSetForeground(sPtr->display, sPtr->monoGC, 1);
XFillRectangle(sPtr->display, mask, sPtr->monoGC, 0, 0, width, height);
}
@@ -524,6 +523,7 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
gcv.function = GXxor;
gcv.foreground = W_PIXEL(scrPtr->white);
if (gcv.foreground == 0) gcv.foreground = 1;
scrPtr->xorGC = XCreateGC(display, W_DRAWABLE(scrPtr), GCFunction
|GCGraphicsExposures|GCForeground, &gcv);

View File

@@ -88,9 +88,18 @@ static char *keyOptions[] = {
"Workspace8Key",
"Workspace9Key",
"Workspace10Key",
"WindowShortcut1Key",
"WindowShortcut2Key",
"WindowShortcut3Key",
"WindowShortcut4Key",
"ClipRaiseKey",
"ClipLowerKey",
#ifndef XKB_MODELOCK
"ClipRaiseLowerKey"
#else
"ClipRaiseLowerKey",
"ToggleKbdModeKey"
#endif /* XKB_MODELOCK */
};
@@ -339,9 +348,16 @@ createPanel(Panel *p)
WMAddListItem(panel->actLs, _("Switch to workspace 8"));
WMAddListItem(panel->actLs, _("Switch to workspace 9"));
WMAddListItem(panel->actLs, _("Switch to workspace 10"));
WMAddListItem(panel->actLs, _("Shortcut for window 1"));
WMAddListItem(panel->actLs, _("Shortcut for window 2"));
WMAddListItem(panel->actLs, _("Shortcut for window 3"));
WMAddListItem(panel->actLs, _("Shortcut for window 4"));
WMAddListItem(panel->actLs, _("Raise Clip"));
WMAddListItem(panel->actLs, _("Lower Clip"));
WMAddListItem(panel->actLs, _("Raise/Lower Clip"));
#ifdef XKB_MODELOCK
WMAddListItem(panel->actLs, _("Toggle keyboard language"));
#endif /* XKB_MODELOCK */
WMSetListAction(panel->actLs, listClick, panel);

View File

@@ -12,7 +12,7 @@ wpdatadir = @wprefsdir@
wpdata_DATA = WPrefs.tiff WPrefs.xpm
EXTRA_DIST = $(wpdata_DATA) TexturePanel.icons
EXTRA_DIST = $(wpdata_DATA) TexturePanel.icons
WPrefs_SOURCES = \
main.c \
@@ -58,9 +58,11 @@ WPrefs_LDADD = \
-L$(top_builddir)/WINGs -lWINGs\
-L$(top_builddir)/wrlib -lwraster \
-L$(top_builddir)/libPropList -lPropList \
@GFXLFLAGS@ \
@XLFLAGS@ \
@GFXLIBS@ \
@XLIBS@ \
@X_EXTRA_LIBS@ \
@INTLIBS@ \
-lm

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@
@@ -103,7 +104,7 @@ wpdatadir = @wprefsdir@
wpdata_DATA = WPrefs.tiff WPrefs.xpm
EXTRA_DIST = $(wpdata_DATA) TexturePanel.icons
EXTRA_DIST = $(wpdata_DATA) TexturePanel.icons
WPrefs_SOURCES = \
main.c \
@@ -148,6 +149,7 @@ WPrefs_LDADD = \
-L$(top_builddir)/WINGs -lWINGs\
-L$(top_builddir)/wrlib -lwraster \
-L$(top_builddir)/libPropList -lPropList \
@GFXLFLAGS@ \
@XLFLAGS@ \
@GFXLIBS@ \
@XLIBS@ \

View File

@@ -43,6 +43,9 @@ typedef struct _Panel {
WMFrame *optF;
WMButton *raisB;
#ifdef XKB_MODELOCK
WMButton *modeB;
#endif /* XKB_MODELOCK */
} _Panel;
@@ -76,6 +79,9 @@ showData(_Panel *panel)
WMSetButtonSelected(panel->raisB, GetBoolForKey("CirculateRaise"));
#ifdef XKB_MODELOCK
WMSetButtonSelected(panel->modeB, GetBoolForKey("KbdModeLock"));
#endif /* XKB_MODELOCK */
WMSetButtonSelected(panel->ballB[0], GetBoolForKey("WindowTitleBalloons"));
WMSetButtonSelected(panel->ballB[1], GetBoolForKey("MiniwindowTitleBalloons"));
@@ -118,6 +124,9 @@ storeData(_Panel *panel)
SetStringForKey(str, "MoveDisplay");
SetBoolForKey(WMGetButtonSelected(panel->raisB), "CirculateRaise");
#ifdef XKB_MODELOCK
SetBoolForKey(WMGetButtonSelected(panel->modeB), "KbdModeLock");
#endif /* XKB_MODELOCK */
SetBoolForKey(WMGetButtonSelected(panel->ballB[0]), "WindowTitleBalloons");
SetBoolForKey(WMGetButtonSelected(panel->ballB[1]), "MiniwindowTitleBalloons");
SetBoolForKey(WMGetButtonSelected(panel->ballB[2]), "AppIconBalloons");
@@ -191,9 +200,16 @@ createPanel(Panel *p)
panel->raisB = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->raisB, 440, 20);
WMMoveWidget(panel->raisB, 20, 25);
WMMoveWidget(panel->raisB, 20, 15);
WMSetButtonText(panel->raisB, _("Raise window when switching focus with keyboard (CirculateRaise)."));
#ifdef XKB_MODELOCK
panel->modeB = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->modeB, 440, 20);
WMMoveWidget(panel->modeB, 20, 40);
WMSetButtonText(panel->modeB, _("Keep keyboard language status for each window."));
#endif
WMMapSubwidgets(panel->optF);
WMRealizeWidget(panel->frame);

View File

@@ -558,7 +558,7 @@ loadConfigurations(WMScreen *scr, WMWindow *mainw)
wfatal(_("Make sure Window Maker is in your search path."));
WMRunAlertPanel(scr, mainw, _("Error"),
_("Could not extract version from Window Maker. Make sure it is correctly installed."),
_("Could not extract version from Window Maker. Make sure it is correctly installed and is in your PATH environment variable."),
_("OK"), NULL, NULL);
exit(1);
}

View File

@@ -37,7 +37,7 @@
#include <WUtil.h>
#define WVERSION "0.6"
#define WVERSION "0.7"
#define WMVERSION "0.20.x"

View File

@@ -41,6 +41,7 @@ WPrefs.pot: $(POTFILES)
mv -f WPrefs.po WPrefs.pot; \
fi
install-data-local: $(CATALOGS)
$(mkinstalldirs) $(nlsdir)
chmod 755 $(nlsdir)
@@ -53,3 +54,4 @@ install-data-local: $(CATALOGS)
$(INSTALL) -m 644 $$n $(nlsdir)/$$l/LC_MESSAGES/WPrefs.mo; \
fi; \
done

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -8,5 +8,5 @@ pt.po Portuguese Alfredo K. Kojima <kojima@inf.ufrgs.br>
hr.po Croatian Toni Biliæ <tbilic@oliver.efos.hr>
fr.po French Bastien NOCERA <hadess@writeme.com>
ko.po Korean Byeong-Chan, Kim <redhands@linux.sarang.net>
cs.po Czech 3 David ©auer <xsauer@hwlab.felk.cvut.cz>
cs.po Czech David ©auer <xsauer@hwlab.felk.cvut.cz>
ja.po Japanese Kazuhide Takahashi <kazu@dgra.ne.jp>

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -25,7 +25,7 @@
}
);
Position = "-64,0";
Lowered = Yes;
Lowered = No;
};
Clip = {
Command = "-";

View File

@@ -25,7 +25,7 @@
}
);
Position = "-64,0";
Lowered = Yes;
Lowered = No;
};
Clip = {
Command = "-";

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

469
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -10,13 +10,13 @@ dnl
AC_INIT(src/WindowMaker.h)
AM_INIT_AUTOMAKE(WindowMaker, 0.20.2)
AM_INIT_AUTOMAKE(WindowMaker, 0.20.3)
dnl Shared Library Versions
WINGS_VER=0.0.1
WRASTER_VER=0.0.1
#WINGS_VER=0.0.1
#WRASTER_VER=0.0.1
dnl configure/build bundled libraries
@@ -52,9 +52,16 @@ AC_FUNC_VPRINTF
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(gethostname gettimeofday select poll strerror strncasecmp setpgid)
if test "$ac_cv_func_gettimeofday" != yes; then
echo "The gettimeofday() system call is not available in your system"
echo "but it is required by Window Maker. Sorry."
exit 1
fi
AC_PATH_PROG(CPP_PATH, cpp, notfound,
/lib:/usr/bin:/bin:/usr/lib:/usr/ccs/lib:$PATH)
if test "x$CPP_PATH" = x; then
AC_PATH_PROG(CPP_PATH, cpp, notfound,
/lib:/usr/bin:/bin:/usr/lib:/usr/ccs/lib:$PATH)
fi
dnl
dnl Tell stupid Solaris cpp that the files it will process have C++ like syntax
@@ -181,6 +188,14 @@ fi
AC_SUBST(I18N_MB)
dnl XKB keyboard language status
dnl ============================
AC_ARG_ENABLE(modelock,
[ --enable-modelock XKB keyboard language status support],
X_CFLAGS="$X_CFLAGS -DXKB_MODELOCK",)
dnl Added by Oliver - Support for NLSDIR option, Hi Oliver!
dnl ===========================================
AC_ARG_WITH(nlsdir,
@@ -190,7 +205,7 @@ if test "x$NLSDIR" = "x"; then
if test "x$with_nlsdir" != "x"; then
NLSDIR=$with_nlsdir
else
NLSDIR="/usr/lib/locale"
NLSDIR='$(prefix)/lib/locale'
fi
fi
@@ -281,10 +296,10 @@ dnl ==============================================
dnl
dnl Specify paths to look for graphic format libraries
dnl ==================================================
GFXLIBS=""
AC_ARG_WITH(gfx-libs,
[ --with-gfx-libs pass compiler flags to look for gfx libraries],
[GFXLIBS="$withval" GFX_LIB_PATH=$withval],
[GFXLIBS="" GFX_LIB_PATH=""])
[GFXLFLAGS=$withval], [GFXLFLAGS=""])
AC_ARG_WITH(gfx-incs,
[ --with-gfx-incs pass compiler flags to look for gfx header files],
@@ -304,7 +319,7 @@ AC_ARG_ENABLE(xpm,
if test "$xpm" = yes; then
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
my_libok=yes, my_libok=no,
$GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $XLIBS)
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS)
if test "$my_libok" = yes; then
my_old_cppflags=$CPPFLAGS
@@ -331,7 +346,7 @@ dnl ===============================================
dnl test for zlib
dnl =============
AC_CHECK_LIB(z, gzread, zlib=yes, zlib=no, $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS)
AC_CHECK_LIB(z, gzread, zlib=yes, zlib=no, $GFX_INC_PATH $GFXLFLAGS $XLFLAGS)
dnl PNG Support
@@ -345,11 +360,11 @@ png=yes
if test "$png" = yes -a "$zlib" = yes ; then
AC_CHECK_LIB(png, png_get_valid, my_libok=yes, my_libok=no,
$GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS -lz -lm)
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS -lz -lm)
if test "$my_libok" = yes; then
my_old_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH"
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
AC_CHECK_HEADER(png.h,
[GFXLIBS="$GFXLIBS -lpng -lz" GFXFLAGS="$GFXFLAGS -DUSE_PNG"
supported_gfx="$supported_gfx PNG"], )
@@ -367,11 +382,11 @@ AC_ARG_ENABLE(jpeg,
if test "$jpeg" = yes; then
AC_CHECK_LIB(jpeg, jpeg_destroy_compress, my_libok=yes, my_libok=no,
$GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS)
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS)
if test "$my_libok" = yes; then
my_old_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH"
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
AC_TRY_CPP(jpeglib.h,
[GFXLIBS="$GFXLIBS -ljpeg" GFXFLAGS="$GFXFLAGS -DUSE_JPEG"
supported_gfx="$supported_gfx JPEG"], )
@@ -395,7 +410,7 @@ if test "$gif" = yes; then
AC_CHECK_LIB(ungif, DGifOpenFileName,
[my_libok=yes my_libname=ungif],
[retry=yes my_libok=no],
$GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS)
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS)
dnl
dnl libungif is the same thing as libgif for all practical purposes.
dnl
@@ -403,12 +418,12 @@ dnl
AC_CHECK_LIB(gif, DGifOpenFileName,
[my_libok=yes my_libname=gif],
my_libok=no,
$GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS)
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS)
fi
if test "$my_libok" = yes; then
my_old_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH"
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
AC_CHECK_HEADER(gif_lib.h,
[GFXLIBS="$GFXLIBS -l$my_libname" GFXFLAGS="$GFXFLAGS -DUSE_GIF"
supported_gfx="$supported_gfx GIF"], )
@@ -438,7 +453,7 @@ if test "$tif" = yes; then
my_libname=""
AC_CHECK_LIB(tiff, TIFFGetVersion,
[my_libok=yes my_libname="-ltiff"], my_libok=no,
[$GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $XLIBS $GFXLIBS -lm])
[$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lm])
dnl
dnl Retry with zlib
dnl
@@ -446,19 +461,19 @@ dnl
if test "$zlib" = "yes"; then
AC_CHECK_LIB(tiff, TIFFGetVersion,
[my_libok=yes my_libname="-ltiff -lz"], my_libok=no,
[$GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $XLIBS $GFXLIBS -lz -lm])
[$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lz -lm])
fi
fi
if test "$my_libok" = no; then
AC_CHECK_LIB(tiff34, TIFFGetVersion,
[my_libok=yes my_libname="-ltiff34"], my_libok=no,
[$GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $XLIBS $GFXLIBS -lm])
[$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lm])
fi
if test "$my_libok" = yes; then
my_old_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH"
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
AC_CHECK_HEADER(tiffio.h,
[GFXFLAGS="$GFXFLAGS -DUSE_TIFF" GFXLIBS="$my_libname $GFXLIBS"
ICONEXT="tiff" supported_gfx="$supported_gfx TIFF"], )
@@ -469,6 +484,7 @@ fi
AC_SUBST(GFXFLAGS)
AC_SUBST(GFXLFLAGS)
AC_SUBST(GFXLIBS)
AC_SUBST(ICONEXT)
@@ -606,17 +622,17 @@ appspath=""
AC_ARG_WITH(appspath,
[ --with-appspath=PATH specify the path of the GNUstep applications directory])
if test "x$appspath" = "x"; then
gnustepdir="${prefix}/GNUstep"
if test "x$with_appspath" = "x"; then
gnustepdir='$(prefix)/GNUstep'
if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s%${prefix}%\${prefix}%"`
fi
appspath=$gnustepdir/Apps
with_appspath=$gnustepdir/Apps
fi
wprefsdir=$appspath/WPrefs.app
wprefsdir=$with_appspath/WPrefs.app
AC_SUBST(wprefsdir)

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -102,16 +102,16 @@ CPPFLAGS = \
INCLUDES = \
@XCFLAGS@ \
-I$(top_srcdir)/libPropList \
-I$(top_srcdir)/wrlib \
-I$(top_srcdir)/WINGs
-I$(top_srcdir)/WINGs @XCFLAGS@
wmaker_LDADD = \
-L$(top_builddir)/WINGs -lWINGs\
-L$(top_builddir)/wrlib -lwraster\
-L$(top_builddir)/libPropList -lPropList\
@GFXLFLAGS@ \
@XLFLAGS@ \
@GFXLIBS@ \
@XLIBS@ \

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@
@@ -191,15 +192,15 @@ CPPFLAGS = \
-DPIXMAPDIR="\"$(pixmapdir)\""
INCLUDES = \
@XCFLAGS@ \
-I$(top_srcdir)/libPropList \
-I$(top_srcdir)/wrlib \
-I$(top_srcdir)/WINGs
-I$(top_srcdir)/WINGs @XCFLAGS@
wmaker_LDADD = \
-L$(top_builddir)/WINGs -lWINGs\
-L$(top_builddir)/wrlib -lwraster\
-L$(top_builddir)/libPropList -lPropList\
@GFXLFLAGS@ \
@XLFLAGS@ \
@GFXLIBS@ \
@XLIBS@ \

View File

@@ -223,6 +223,10 @@ typedef struct WPreferences {
* of their owners */
char title_justification; /* titlebar text alignment */
#ifdef KEEP_XKB_LOCK_STATUS
char modelock;
#endif
char no_dithering; /* use dithering or not */
char no_sound; /* enable/disable sound */

View File

@@ -43,6 +43,8 @@
#include "dock.h"
#include "appmenu.h"
#include "winspector.h"
#include "list.h"
#include "workspace.h"
#ifdef WMSOUND
#include "wmsound.h"
@@ -273,14 +275,15 @@ wShadeWindow(WWindow *wwin)
while (h>wwin->frame->top_width+1) {
XMoveWindow(dpy, wwin->client_win, 0, y);
XResizeWindow(dpy, wwin->frame->core->window, w, h);
XSync(dpy, 0);
XFlush(dpy);
if (time(NULL)-time0 > MAX_ANIMATION_TIME)
break;
if (SHADE_DELAY > 0)
wusleep(SHADE_DELAY*1000L);
h-=s;
y-=s;
if (time(NULL)-time0 > MAX_ANIMATION_TIME)
break;
}
XMoveWindow(dpy, wwin->client_win, 0, wwin->frame->top_width);
}
@@ -300,7 +303,9 @@ wShadeWindow(WWindow *wwin)
/* for the client it's just like iconification */
wFrameWindowResize(wwin->frame, wwin->frame->core->width,
wwin->frame->top_width-1);
/*
wClientSetState(wwin, IconicState, None);
*/
/* update window list to reflect shaded state */
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);
@@ -368,8 +373,9 @@ wUnshadeWindow(WWindow *wwin)
wFrameWindowResize(wwin->frame, wwin->frame->core->width,
wwin->frame->top_width + wwin->client.height
+ wwin->frame->bottom_width);
/*
wClientSetState(wwin, NormalState, None);
*/
/* if the window is focused, set the focus again as it was disabled during
* shading */
if (wwin->flags.focused)
@@ -1592,3 +1598,37 @@ wArrangeIcons(WScreen *scr, Bool arrangeAll)
}
void
wSelectWindow(WWindow *wwin, Bool flag)
{
WScreen *scr = wwin->screen_ptr;
if (flag) {
wwin->flags.selected = 1;
XSetWindowBorder(dpy, wwin->frame->core->window, scr->white_pixel);
scr->selected_windows = list_cons(wwin, scr->selected_windows);
} else {
wwin->flags.selected = 0;
XSetWindowBorder(dpy, wwin->frame->core->window,
scr->frame_border_pixel);
scr->selected_windows = list_remove_elem(scr->selected_windows, wwin);
}
}
void
wMakeWindowVisible(WWindow *wwin)
{
wWorkspaceChange(wwin->screen_ptr, wwin->frame->workspace);
if (wwin->flags.shaded) {
wUnshadeWindow(wwin);
}
if (wwin->flags.hidden) {
wUnhideApplication(wApplicationOf(wwin->main_window), False, False);
} else if (wwin->flags.miniaturized) {
wDeiconifyWindow(wwin);
} else {
wSetFocusTo(wwin->screen_ptr, wwin);
wRaiseFrame(wwin->frame->core);
}
}

View File

@@ -41,8 +41,8 @@ void wIconifyWindow(WWindow *wwin);
void wDeiconifyWindow(WWindow *wwin);
void wSelectWindows(WScreen *scr, XEvent *ev);
void wSelectWindow(WWindow *wwin);
void wUnselectWindows();
void wSelectWindow(WWindow *wwin, Bool flag);
void wUnselectWindows(WScreen *scr);
void wMaximizeWindow(WWindow *wwin, int directions);
void wUnmaximizeWindow(WWindow *wwin);
@@ -58,6 +58,6 @@ void wRefreshDesktop(WScreen *scr);
void wArrangeIcons(WScreen *scr, Bool arrangeAll);
void wMakeWindowVisible(WWindow *wwin);
#endif

View File

@@ -137,8 +137,7 @@ makePixmap(WScreen *scr, int width, int height, int side, Pixmap *mask)
if (!bal->monoGC) {
bal->monoGC = XCreateGC(dpy, bitmap, 0, NULL);
}
XSetForeground(dpy, bal->monoGC,
BlackPixelOfScreen(ScreenOfDisplay(dpy, scr->screen)));
XSetForeground(dpy, bal->monoGC, 0);
XFillRectangle(dpy, bitmap, bal->monoGC, 0, 0, width+SPACE, height+SPACE);
pixmap = XCreatePixmap(dpy, scr->root_win, width+SPACE, height+SPACE,
@@ -153,8 +152,7 @@ makePixmap(WScreen *scr, int width, int height, int side, Pixmap *mask)
}
x = 0;
XSetForeground(dpy, bal->monoGC,
WhitePixelOfScreen(ScreenOfDisplay(dpy, scr->screen)));
XSetForeground(dpy, bal->monoGC, 1);
drawBalloon(bitmap, bal->monoGC, x, y, width, height, side);
XSetForeground(dpy, scr->draw_gc, scr->white_pixel);
drawBalloon(pixmap, scr->draw_gc, x+1, y+1, width-2, height-2, side);

View File

@@ -73,8 +73,9 @@ extern Bool wShapeSupported;
void
wClientRestore(WWindow *wwin)
{
#if 0
int gx, gy;
wClientGetGravityOffsets(wwin, &gx, &gy);
/* set the positio of the frame on screen */
wwin->frame_x -= gx * FRAME_BORDER_WIDTH;
@@ -82,7 +83,7 @@ wClientRestore(WWindow *wwin)
/* if gravity is to the south, account for the border sizes */
if (gy > 0)
wwin->frame_y += (wwin->frame->top_width + wwin->frame->bottom_width);
#endif
XUnmapWindow(dpy, wwin->client_win);
XSetWindowBorderWidth(dpy, wwin->client_win, wwin->old_border_width);
XReparentWindow(dpy, wwin->client_win, wwin->screen_ptr->root_win,
@@ -232,12 +233,12 @@ wClientConfigure(WWindow *wwin, XConfigureRequestEvent *xcre)
if (!wwin->flags.shaded) {
/* If the window is shaded, wrong height will be set for the window */
if (xcre->value_mask & CWX)
nx = xcre->x - FRAME_BORDER_WIDTH;
nx = xcre->x;
else
nx = wwin->frame_x;
if (xcre->value_mask & CWY)
ny = xcre->y - FRAME_BORDER_WIDTH - ((ofs_y < 0) ? 0 : wwin->frame->top_width);
ny = xcre->y - ((ofs_y < 0) ? 0 : wwin->frame->top_width);
else
ny = wwin->frame_y;
@@ -708,8 +709,12 @@ GetColormapWindows(WWindow *wwin)
if (wwin->cmap_windows) {
XFree(wwin->cmap_windows);
}
if (!XGetWMColormapWindows(dpy, wwin->client_win, &(wwin->cmap_windows),
&(wwin->cmap_window_no))) {
wwin->cmap_windows = NULL;
wwin->cmap_window_no = 0;
if (XGetWMColormapWindows(dpy, wwin->client_win, &(wwin->cmap_windows),
&(wwin->cmap_window_no))!=Success) {
wwin->cmap_window_no = 0;
wwin->cmap_windows = NULL;
}

View File

@@ -69,7 +69,13 @@ wColormapInstallForWindow(WScreen *scr, WWindow *wwin)
if (scr->current_colormap != attributes.colormap) {
scr->current_colormap = attributes.colormap;
XInstallColormap(dpy, attributes.colormap);
/*
* ICCCM 2.0: some client requested permission
* to install colormaps by itself and we granted.
* So, we can't install any colormaps.
*/
if (!scr->flags.colormap_stuff_blocked)
XInstallColormap(dpy, attributes.colormap);
}
}
}
@@ -81,9 +87,11 @@ wColormapInstallForWindow(WScreen *scr, WWindow *wwin)
if (scr->current_colormap != attributes.colormap) {
scr->current_colormap = attributes.colormap;
XInstallColormap(dpy, attributes.colormap);
if (!scr->flags.colormap_stuff_blocked)
XInstallColormap(dpy, attributes.colormap);
}
}
XSync(dpy, False);
}
@@ -110,3 +118,18 @@ wColormapUninstallRoot(WScreen *scr)
}
}
void
wColormapAllowClientInstallation(WScreen *scr, Bool starting)
{
scr->flags.colormap_stuff_blocked = starting;
/*
* Client stopped managing the colormap stuff. Restore the colormap
* that would be installed if the client did not request colormap
* stuff.
*/
if (!starting) {
XInstallColormap(dpy, scr->current_colormap);
XSync(dpy, False);
}
}

View File

@@ -66,7 +66,7 @@
#define PACKAGE "WindowMaker"
/* package version */
#define VERSION "0.20.2"
#define VERSION "0.20.3"
/* Define if you have the gethostname function. */
#define HAVE_GETHOSTNAME 1

View File

@@ -596,7 +596,27 @@ WDefaultEntry optionList[] = {
},
{"Workspace10Key", "None", (void*)WKBD_WORKSPACE10,
NULL, getKeybind, setKeyGrab
},
{"WindowShortcut1Key","None", (void*)WKBD_WINDOW1,
NULL, getKeybind, setKeyGrab
},
{"WindowShortcut2Key","None", (void*)WKBD_WINDOW2,
NULL, getKeybind, setKeyGrab
},
{"WindowShortcut3Key","None", (void*)WKBD_WINDOW3,
NULL, getKeybind, setKeyGrab
},
{"WindowShortcut4Key","None", (void*)WKBD_WINDOW4,
NULL, getKeybind, setKeyGrab
},
#ifdef KEEP_XKB_LOCK_STATUS
{"ToggleKbdModeKey", "None", (void*)WKBD_TOGGLE,
NULL, getKeybind, setKeyGrab
},
{"KbdModeLock", "NO", NULL,
&wPreferences.modelock, getBool, NULL
}
#endif /* KEEP_XKB_LOCK_STATUS */
};

View File

@@ -947,7 +947,7 @@ makeClipOptionsMenu(WScreen *scr)
return NULL;
}
entry = wMenuAddCallback(menu, _("Keep Clip On Top"),
entry = wMenuAddCallback(menu, _("Keep on top"),
toggleLoweredCallback, NULL);
entry->flags.indicator = 1;
entry->flags.indicator_on = 1;
@@ -995,7 +995,7 @@ dockMenuCreate(WScreen *scr, int type)
menu = wMenuCreate(scr, NULL, False);
if (type != WM_CLIP) {
entry = wMenuAddCallback(menu, _("Keep Dock On Top"),
entry = wMenuAddCallback(menu, _("Keep on top"),
toggleLoweredCallback, NULL);
entry->flags.indicator = 1;
entry->flags.indicator_on = 1;
@@ -1194,8 +1194,8 @@ make_icon_state(WAppIcon *btn)
{
proplist_t node = NULL;
proplist_t command, autolaunch, name, forced, host, position, buggy;
char buffer[256];
char *tmp;
char buffer[64];
if (btn) {
if (!btn->command)
@@ -1205,16 +1205,11 @@ make_icon_state(WAppIcon *btn)
autolaunch = btn->auto_launch ? dYes : dNo;
if (btn->wm_class && btn->wm_instance)
sprintf(buffer, "%s.%s", btn->wm_instance, btn->wm_class);
else if (btn->wm_instance)
sprintf(buffer, "%s", btn->wm_instance);
else if (btn->wm_class)
sprintf(buffer, ".%s", btn->wm_class);
else
sprintf(buffer, ".");
tmp = EscapeWM_CLASS(btn->wm_instance, btn->wm_class);
name = PLMakeString(buffer);
name = PLMakeString(tmp);
free(tmp);
forced = btn->forced_dock ? dYes : dNo;
@@ -1371,7 +1366,10 @@ restore_icon_state(WScreen *scr, proplist_t info, int type, int index)
/* get commands */
command = wstrdup(PLGetString(cmd));
if (cmd)
command = wstrdup(PLGetString(cmd));
else
command = NULL;
if (!command || strcmp(command, "-")==0) {
if (command)
@@ -3724,7 +3722,7 @@ showClipBalloon(WDock *dock, int workspace)
text = scr->workspaces[workspace]->name;
w = wTextWidth(scr->clip_title_font->font, text, strlen(text)) + 4;
w = wTextWidth(scr->clip_title_font->font, text, strlen(text));
h = scr->clip_title_font->height;
XResizeWindow(dpy, scr->clip_balloon, w, h);

View File

@@ -39,6 +39,9 @@
#include <gdk/gdk.h>
#endif
#ifdef KEEP_XKB_LOCK_STATUS
#include <X11/XKBlib.h>
#endif /* KEEP_XKB_LOCK_STATUS */
#include "WindowMaker.h"
#include "window.h"
@@ -70,6 +73,8 @@ extern WPreferences wPreferences;
#define MOD_MASK wPreferences.modifier_mask
extern Atom _XA_WM_COLORMAP_NOTIFY;
extern Atom _XA_WM_CHANGE_STATE;
extern Atom _XA_WM_DELETE_WINDOW;
extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
@@ -116,6 +121,7 @@ static void handleClientMessage();
static void handleKeyPress();
static void handleFocusIn();
static void handleMotionNotify();
#ifdef SHAPE
static void handleShapeNotify();
#endif
@@ -148,7 +154,7 @@ static DeathHandler *deathHandler=NULL;
WDeathHandlerID
WMagicNumber
wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata)
{
DeathHandler *handler;
@@ -171,7 +177,7 @@ wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata)
void
wDeleteDeathHandler(WDeathHandlerID id)
wDeleteDeathHandler(WMagicNumber id)
{
DeathHandler *tmp, *handler=(DeathHandler*)id;
@@ -259,7 +265,7 @@ DispatchEvent(XEvent *event)
case ConfigureRequest:
handleConfigureRequest(event);
break;
case DestroyNotify:
handleDestroyNotify(event->xdestroywindow.window);
break;
@@ -271,7 +277,7 @@ DispatchEvent(XEvent *event)
case UnmapNotify:
handleUnmapNotify(event);
break;
case ButtonPress:
handleButtonPress(event);
break;
@@ -522,8 +528,6 @@ handleMapRequest(XEvent *ev)
if (state==WithdrawnState) {
wwin->flags.mapped = 0;
wClientSetState(wwin, WithdrawnState, None);
XSelectInput(dpy, wwin->client_win, NoEventMask);
XRemoveFromSaveSet(dpy, wwin->client_win);
wUnmanageWindow(wwin, True);
} else {
wClientSetState(wwin, NormalState, None);
@@ -549,32 +553,6 @@ handleMapRequest(XEvent *ev)
wwin->flags.ignore_next_unmap = 1;
}
}
#if 0
switch (state) {
case WithdrawnState:
wwin->flags.mapped = 0;
wClientSetState(wwin, WithdrawnState, None);
XSelectInput(dpy, wwin->client_win, NoEventMask);
XRemoveFromSaveSet(dpy, wwin->client_win);
wUnmanageWindow(wwin, True);
break;
case IconicState:
if (!wwin->flags.miniaturized) {
wwin->flags.ignore_next_unmap=1;
wwin->flags.skip_next_animation=1;
wIconifyWindow(wwin);
}
break;
/*
case DontCareState:
case NormalState:
*/
default:
wClientSetState(wwin, NormalState, None);
break;
}
#endif
}
}
@@ -674,7 +652,7 @@ handleButtonPress(XEvent *event)
}
} else if (event->xbutton.button==wPreferences.select_button) {
wUnselectWindows();
wUnselectWindows(scr);
wSelectWindows(scr, event);
}
}
@@ -782,12 +760,19 @@ handleUnmapNotify(XEvent *event)
if (XCheckTypedWindowEvent(dpy, wwin->client_win, DestroyNotify,&ev)) {
DispatchEvent(&ev);
} else {
Bool reparented = False;
if (XCheckTypedWindowEvent(dpy, wwin->client_win, ReparentNotify, &ev))
reparented = True;
/* withdraw window */
wwin->flags.mapped = 0;
XSelectInput(dpy, wwin->client_win, NoEventMask);
XRemoveFromSaveSet(dpy, wwin->client_win);
wClientSetState(wwin, WithdrawnState, None);
wUnmanageWindow(wwin, True);
if (!reparented)
wClientSetState(wwin, WithdrawnState, None);
/* if the window was reparented, do not reparent it back to the
* root window */
wUnmanageWindow(wwin, !reparented);
}
XUngrabServer(dpy);
}
@@ -856,6 +841,18 @@ handleClientMessage(XEvent *event)
if (!wwin) return;
if (!wwin->flags.miniaturized)
wIconifyWindow(wwin);
} else if (event->xclient.message_type == _XA_WM_COLORMAP_NOTIFY
&& event->xclient.format == 32) {
WScreen *scr = wScreenForRootWindow(event->xclient.window);
if (!scr)
return;
if (event->xclient.data.l[1] == 1) { /* starting */
wColormapAllowClientInstallation(scr, True);
} else { /* stopping */
wColormapAllowClientInstallation(scr, False);
}
} else if (event->xclient.message_type == _XA_WINDOWMAKER_WM_FUNCTION) {
WApplication *wapp;
int done=0;
@@ -1228,8 +1225,8 @@ handleColormapNotify(XEvent *event)
&& ((wwin = wWindowFor(event->xcolormap.window)) || 1));
if (reinstall && scr->current_colormap!=None) {
XInstallColormap(dpy, scr->current_colormap);
if (!scr->flags.colormap_stuff_blocked)
XInstallColormap(dpy, scr->current_colormap);
}
}
@@ -1286,6 +1283,9 @@ handleKeyPress(XEvent *event)
int i;
int modifiers;
int command=-1;
#ifdef KEEP_XKB_LOCK_STATUS
XkbStateRec staterec;
#endif /*KEEP_XKB_LOCK_STATUS*/
/* ignore CapsLock */
modifiers = event->xkey.state & ValidModMask;
@@ -1428,7 +1428,7 @@ handleKeyPress(XEvent *event)
break;
case WKBD_SELECT:
if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {
wSelectWindow(wwin);
wSelectWindow(wwin, !wwin->flags.selected);
}
break;
case WKBD_FOCUSNEXT:
@@ -1488,7 +1488,21 @@ handleKeyPress(XEvent *event)
else if (scr->current_workspace==0 && wPreferences.ws_cycle)
wWorkspaceChange(scr, scr->workspace_count-1);
break;
case WKBD_WINDOW1:
case WKBD_WINDOW2:
case WKBD_WINDOW3:
case WKBD_WINDOW4:
if (scr->shortcutWindow[command-WKBD_WINDOW1]) {
wMakeWindowVisible(scr->shortcutWindow[command-WKBD_WINDOW1]);
} else if (wwin && ISMAPPED(wwin) && ISFOCUSED(wwin)) {
scr->shortcutWindow[command-WKBD_WINDOW1] = wwin;
wSelectWindow(wwin, !wwin->flags.selected);
XFlush(dpy);
wusleep(3000);
wSelectWindow(wwin, !wwin->flags.selected);
XFlush(dpy);
}
break;
case WKBD_NEXTWSLAYER:
case WKBD_PREVWSLAYER:
{
@@ -1518,6 +1532,17 @@ handleKeyPress(XEvent *event)
if (!wPreferences.flags.noclip)
wDockRaiseLower(scr->workspaces[scr->current_workspace]->clip);
break;
#ifdef KEEP_XKB_LOCK_STATUS
case WKBD_TOGGLE:
if(wPreferences.modelock){
XkbGetState(dpy,XkbUseCoreKbd,&staterec);
/*toggle*/
XkbLockGroup(dpy,XkbUseCoreKbd,
wwin->languagemode=staterec.compat_state&32?0:1);
}
break;
#endif /* KEEP_XKB_LOCK_STATUS */
}
}

View File

@@ -31,9 +31,6 @@ typedef void (WCallBack)(void *cdata);
typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata);
typedef void* WDeathHandlerID;
void RestoreDesktop(WScreen *scr);
void Restart(char *manager);
@@ -62,7 +59,7 @@ void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action);
void UpdateSwitchMenuWorkspace(WScreen *scr, int workspace);
WDeathHandlerID wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
void wColormapInstallForWindow(WScreen *scr, WWindow *wwin);
@@ -70,6 +67,7 @@ void wColormapInstallRoot(WScreen *scr);
void wColormapUninstallRoot(WScreen *scr);
void wColormapAllowClientInstallation(WScreen *scr, Bool starting);
Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height);
@@ -108,6 +106,10 @@ void ParseWindowName(proplist_t value, char **winstance, char **wclass,
char *GetShortcutString(char *text);
char *EscapeWM_CLASS(char *name, char *class);
void UnescapeWM_CLASS(char *str, char **name, char **class);
#ifdef NUMLOCK_HACK
void wHackedGrabKey(int keycode, unsigned int modifiers,
Window grab_window, Bool owner_events, int pointer_mode,

View File

@@ -829,7 +829,7 @@ miniwindowMouseDown(WObjDescriptor *desc, XEvent *event)
wRaiseFrame(icon->core);
if (event->xbutton.state & ShiftMask) {
wIconSelect(icon);
wSelectWindow(icon->owner);
wSelectWindow(icon->owner, !wwin->flags.selected);
}
}

View File

@@ -60,7 +60,19 @@
#define WKBD_NEXTWSLAYER 32
#define WKBD_PREVWSLAYER 33
#define WKBD_LAST 34
/* window shortcuts */
#define WKBD_WINDOW1 34
#define WKBD_WINDOW2 35
#define WKBD_WINDOW3 36
#define WKBD_WINDOW4 37
#ifdef KEEP_XKB_LOCK_STATUS
# define WKBD_TOGGLE 38
# define WKBD_LAST 39
#else
# define WKBD_LAST 38
#endif /* KEEP_XKB_LOCK_STATUS */
typedef struct WShortKey {

View File

@@ -94,6 +94,7 @@ Atom _XA_WM_DELETE_WINDOW;
Atom _XA_WM_SAVE_YOURSELF;
Atom _XA_WM_CLIENT_LEADER;
Atom _XA_WM_COLORMAP_WINDOWS;
Atom _XA_WM_COLORMAP_NOTIFY;
Atom _XA_GNUSTEP_WM_ATTR;
Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;

View File

@@ -854,13 +854,13 @@ keyboardMenu(WMenu *menu)
new_x = scr_width-MENUW(menu)-1;
move_menus(menu, new_x, new_y);
while (!done) {
while (!done && menu->flags.mapped) {
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
WMMaskEvent(dpy, ExposureMask|ButtonMotionMask|ButtonPressMask
|ButtonReleaseMask|KeyPressMask|KeyReleaseMask
|SubstructureNotifyMask, &event);
switch (event.type) {
case KeyPress:
ksym = XLookupKeysym(&event.xkey, 0);
@@ -959,6 +959,7 @@ keyboardMenu(WMenu *menu)
default:
if (event.type==ButtonPress)
done = 1;
WMHandleEvent(&event);
}
}
@@ -1760,14 +1761,17 @@ delaySelection(void *data)
{
delay_data *d = (delay_data*)data;
int x, y, entry_no;
WMenu *menu;
d->magic = NULL;
*(d->delayed_select) = 0;
if (findMenu(d->menu->menu->screen_ptr, &x, &y)) {
entry_no = getEntryAt(d->menu, x, y);
selectEntry(d->menu, entry_no);
menu = findMenu(d->menu->menu->screen_ptr, &x, &y);
if (menu && (d->menu == menu || d->delayed_select)) {
entry_no = getEntryAt(menu, x, y);
selectEntry(menu, entry_no);
}
if (d->delayed_select)
*(d->delayed_select) = 0;
}
@@ -1785,6 +1789,7 @@ menuMouseDown(WObjDescriptor *desc, XEvent *event)
int delayed_select = 0;
int entry_no;
int x, y;
int prevx, prevy;
int old_frame_x = 0;
int old_frame_y = 0;
delay_data d_data = {NULL, NULL, NULL};
@@ -1852,27 +1857,107 @@ menuMouseDown(WObjDescriptor *desc, XEvent *event)
dragScrollMenuCallback(menu);
}
}
prevx = bev->x_root;
prevy = bev->y_root;
while (!done) {
int x, y;
WMMaskEvent(dpy, ExposureMask|ButtonMotionMask|ButtonReleaseMask
|ButtonPressMask, &ev);
switch (ev.type) {
case MotionNotify:
case MotionNotify:
smenu = findMenu(scr, &x, &y);
if (smenu == NULL) {
/* moved mouse out of menu */
if (!delayed_select && d_data.magic) {
WMDeleteTimerHandler(d_data.magic);
d_data.magic = NULL;
}
if (menu==NULL
|| (menu->selected_entry>=0
&& menu->entries[menu->selected_entry]->cascade>=0))
&& menu->entries[menu->selected_entry]->cascade>=0)) {
prevx = ev.xmotion.x_root;
prevy = ev.xmotion.y_root;
break;
}
selectEntry(menu, -1);
menu = smenu;
prevx = ev.xmotion.x_root;
prevy = ev.xmotion.y_root;
break;
} else if (menu && menu!=smenu
&& (menu->selected_entry<0
|| menu->entries[menu->selected_entry]->cascade<0)) {
selectEntry(menu, -1);
if (!delayed_select && d_data.magic) {
WMDeleteTimerHandler(d_data.magic);
d_data.magic = NULL;
}
} else {
/* hysteresis for item selection */
/* check if the motion was to the side, indicating that
* the user may want to cross to a submenu */
if (!delayed_select && menu) {
int dx;
Bool moved_to_submenu;/* moved to direction of submenu */
dx = abs(prevx - ev.xmotion.x_root);
moved_to_submenu = False;
if (dx > 0 /* if moved enough to the side */
/* maybe a open submenu */
&& menu->selected_entry>=0
/* moving to the right direction */
&& (wPreferences.align_menus
|| ev.xmotion.y_root >= prevy)) {
int index;
index = menu->entries[menu->selected_entry]->cascade;
if (index>=0) {
if (menu->cascades[index]->frame_x>menu->frame_x) {
if (prevx < ev.xmotion.x_root)
moved_to_submenu = True;
} else {
if (prevx > ev.xmotion.x_root)
moved_to_submenu = True;
}
}
}
if (menu != smenu) {
if (d_data.magic) {
WMDeleteTimerHandler(d_data.magic);
}
d_data.magic = NULL;
} else if (moved_to_submenu) {
/* while we are moving, postpone the selection */
if (d_data.magic) {
WMDeleteTimerHandler(d_data.magic);
}
d_data.delayed_select = NULL;
d_data.menu = menu;
d_data.magic = WMAddTimerHandler(MENU_SELECT_DELAY,
delaySelection,
&d_data);
prevx = ev.xmotion.x_root;
prevy = ev.xmotion.y_root;
break;
} else {
if (d_data.magic)
WMDeleteTimerHandler(d_data.magic);
d_data.magic = NULL;
}
}
}
prevx = ev.xmotion.x_root;
prevy = ev.xmotion.y_root;
if (menu!=smenu) {
/* pointer crossed menus */
if (menu && menu->timer) {

View File

@@ -1069,7 +1069,6 @@ void
ParseWindowName(proplist_t value, char **winstance, char **wclass, char *where)
{
char *name;
char *dot;
*winstance = *wclass = NULL;
@@ -1084,19 +1083,7 @@ ParseWindowName(proplist_t value, char **winstance, char **wclass, char *where)
return;
}
dot = strchr(name, '.');
if (dot==name) {
*wclass = wstrdup(&name[1]);
*winstance = NULL;
} else if (!dot) {
*winstance = wstrdup(name);
*wclass = NULL;
} else {
*dot = 0;
*winstance = wstrdup(name);
*dot = '.'; /* restore old string */
*wclass = wstrdup(&dot[1]);
}
UnescapeWM_CLASS(name, winstance, wclass);
}
@@ -1190,3 +1177,128 @@ GetShortcutString(char *text)
return buffer;
}
char*
EscapeWM_CLASS(char *name, char *class)
{
char *ret;
char *ename = NULL, *eclass = NULL;
int i, j, l;
if (!name && !class)
return NULL;
if (name) {
l = strlen(name);
ename = wmalloc(l*2);
j = 0;
for (i=0; i<l; i++) {
if (name[i]=='\\') {
ename[j++] = '\\';
} else if (name[i]=='.') {
ename[j++] = '\\';
}
ename[j++] = name[i];
}
ename[j] = 0;
}
if (class) {
l = strlen(class);
eclass = wmalloc(l*2);
j = 0;
for (i=0; i<l; i++) {
if (class[i]=='\\') {
eclass[j++] = '\\';
} else if (class[i]=='.') {
eclass[j++] = '\\';
}
eclass[j++] = class[i];
}
eclass[j] = 0;
}
if (ename && eclass) {
ret = wmalloc(strlen(ename)+strlen(eclass)+4);
sprintf(ret, "%s.%s", ename, eclass);
free(ename);
free(eclass);
} else if (ename) {
ret = wstrdup(ename);
free(ename);
} else {
ret = wstrdup(eclass);
free(eclass);
}
return ret;
}
void
UnescapeWM_CLASS(char *str, char **name, char **class)
{
int i, j, k, dot;
Bool esc;
j = strlen(str);
*name = wmalloc(j);
**name = 0;
*class = wmalloc(j);
**class = 0;
/* separate string in 2 parts */
esc = False;
dot = 0;
for (i = 0; i < j; i++) {
if (!esc) {
if (str[i]=='\\') {
esc = True;
} else if (str[i]=='.') {
dot = i;
break;
}
} else {
esc = False;
}
}
/* unescape strings */
esc = False;
k = 0;
for (i = 0; i < dot; i++) {
if (!esc) {
if (str[i]=='\\') {
esc = True;
} else {
(*name)[k++] = str[i];
}
} else {
esc = False;
}
}
(*name)[k] = 0;
esc = False;
k = 0;
for (i = dot+1; i<j; i++) {
if (!esc) {
if (str[i]=='\\') {
esc = True;
} else {
(*class)[k++] = str[i];
}
} else {
esc = False;
}
}
(*class)[k] = 0;
if (!*name) {
free(*name);
*name = NULL;
}
if (!*class) {
free(*class);
*class = NULL;
}
}

View File

@@ -59,9 +59,6 @@ extern WPreferences wPreferences;
extern Atom _XA_WM_PROTOCOLS;
/** Locals **/
static LinkedList *wSelectedWindows=NULL;
void
@@ -572,8 +569,7 @@ static void
flushMotion()
{
XEvent ev;
XSync(dpy, 0);
while (XCheckMaskEvent(dpy, ButtonMotionMask, &ev)) ;
}
@@ -654,7 +650,7 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
if (!wwin->flags.selected) {
/* this window is not selected, unselect others and move only wwin */
wUnselectWindows();
wUnselectWindows(scr);
}
orig_x = ox = ev->xbutton.x_root;
orig_y = oy = ev->xbutton.y_root;
@@ -690,18 +686,18 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
}
switch (event.type) {
case KeyPress:
if (wSelectedWindows)
if (scr->selected_windows)
break;
if ((event.xkey.keycode == shiftl || event.xkey.keycode == shiftr)
&& started) {
if (!opaque_move)
drawFrames(wwin, wSelectedWindows,
drawFrames(wwin, scr->selected_windows,
ox - orig_x, oy - orig_y, off_x, off_y);
cyclePositionDisplay(wwin, x, y, w, h);
if (!opaque_move) {
drawFrames(wwin, wSelectedWindows,
drawFrames(wwin, scr->selected_windows,
ox - orig_x, oy - orig_y, off_x, off_y);
}
showPosition(wwin, x, y);
@@ -713,12 +709,12 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
showPosition(wwin, x, y);
if (!opaque_move) {
drawFrames(wwin, wSelectedWindows,
drawFrames(wwin, scr->selected_windows,
ox-orig_x, oy-orig_y, off_x, off_y);
} else {
doWindowMove(wwin, event.xmotion.x_root + XOffset,
event.xmotion.y_root + YOffset,
wSelectedWindows,
scr->selected_windows,
event.xmotion.x_root - ox,
event.xmotion.y_root - oy,
off_x, off_y);
@@ -729,7 +725,7 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
checkEdgeResistance(wwin, &x, &y, off_x, off_y);
if (!wSelectedWindows) {
if (!scr->selected_windows) {
if (wPreferences.move_display == WDIS_FRAME_CENTER)
moveGeometryDisplayCentered(scr, x + w/2, y + h/2);
}
@@ -806,7 +802,7 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
event.xmotion.x_root = orig_x;
event.xmotion.y_root = orig_y;
if (!wSelectedWindows)
if (!scr->selected_windows)
mapPositionDisplay(wwin, x, y, w, h);
if (!opaque_move)
@@ -816,7 +812,7 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
oy = event.xmotion.y_root;
if (started && !opaque_move)
drawFrames(wwin, wSelectedWindows, ox - orig_x, oy - orig_y, off_x, off_y);
drawFrames(wwin, scr->selected_windows, ox - orig_x, oy - orig_y, off_x, off_y);
showPosition(wwin, x, y);
break;
@@ -830,12 +826,12 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
if (started) {
if (!opaque_move) {
drawFrames(wwin, wSelectedWindows,
drawFrames(wwin, scr->selected_windows,
ox - orig_x, oy - orig_y, off_x, off_y);
XSync(dpy, 0);
doWindowMove(wwin, event.xmotion.x_root + XOffset,
event.xmotion.y_root + YOffset,
wSelectedWindows,
scr->selected_windows,
ox - orig_x, oy - orig_y,
off_x, off_y);
}
@@ -850,7 +846,7 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
wSetFocusTo(scr, wwin);
}
showPosition(wwin, x, y);
if (!wSelectedWindows) {
if (!scr->selected_windows) {
/* get rid of the geometry window */
unmapPositionDisplay(wwin);
}
@@ -862,12 +858,12 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
default:
if (started && !opaque_move) {
drawFrames(wwin, wSelectedWindows, ox - orig_x, oy - orig_y, off_x, off_y);
drawFrames(wwin, scr->selected_windows, ox - orig_x, oy - orig_y, off_x, off_y);
XUngrabServer(dpy);
WMHandleEvent(&event);
XSync(dpy, False);
XGrabServer(dpy);
drawFrames(wwin, wSelectedWindows, ox - orig_x, oy - orig_y, off_x, off_y);
drawFrames(wwin, scr->selected_windows, ox - orig_x, oy - orig_y, off_x, off_y);
} else {
WMHandleEvent(&event);
}
@@ -969,7 +965,7 @@ wMouseResizeWindow(WWindow *wwin, XEvent *ev)
puts("Resizing window");
#endif
wUnselectWindows();
wUnselectWindows(scr);
rx1 = fx;
rx2 = fx + fw - 1;
ry1 = fy;
@@ -1130,36 +1126,16 @@ wMouseResizeWindow(WWindow *wwin, XEvent *ev)
#undef RESIZEBAR
void
wUnselectWindows()
wUnselectWindows(WScreen *scr)
{
WWindow *wwin;
while (wSelectedWindows) {
wwin = wSelectedWindows->head;
while (scr->selected_windows) {
wwin = scr->selected_windows->head;
if (wwin->flags.miniaturized && wwin->icon && wwin->icon->selected)
wIconSelect(wwin->icon);
XSetWindowBorder(dpy, wwin->frame->core->window,
wwin->screen_ptr->frame_border_pixel);
wwin->flags.selected = 0;
list_remove_head(&wSelectedWindows);
}
}
void
wSelectWindow(WWindow *wwin)
{
if (!wwin->flags.selected) {
wwin->flags.selected = 1;
XSetWindowBorder(dpy, wwin->frame->core->window,
wwin->screen_ptr->white_pixel);
wSelectedWindows = list_cons(wwin, wSelectedWindows);
} else {
wwin->flags.selected = 0;
XSetWindowBorder(dpy, wwin->frame->core->window,
wwin->screen_ptr->frame_border_pixel);
wSelectedWindows = list_remove_elem(wSelectedWindows, wwin);
wSelectWindow(wwin, False);
}
}
@@ -1178,10 +1154,7 @@ selectWindowsInside(WScreen *scr, int x1, int y1, int x2, int y2)
&& (tmpw->frame_x >= x1) && (tmpw->frame_y >= y1)
&& (tmpw->frame->core->width + tmpw->frame_x <= x2)
&& (tmpw->frame->core->height + tmpw->frame_y <= y2)) {
XSetWindowBorder(dpy, tmpw->frame->core->window,
tmpw->screen_ptr->white_pixel);
tmpw->flags.selected = 1;
wSelectedWindows = list_cons(tmpw, wSelectedWindows);
wSelectWindow(tmpw, True);
}
}
tmpw = tmpw->prev;
@@ -1211,7 +1184,7 @@ wSelectWindows(WScreen *scr, XEvent *ev)
}
XGrabServer(dpy);
wUnselectWindows();
wUnselectWindows(scr);
XDrawRectangle(dpy, root, gc, xp, yp, w, h);
while (1) {

View File

@@ -409,16 +409,22 @@ smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
}
/* Alfredo, shouldn't the cascade placement follow the !dock->lowered flag
* like smart placement?
* I didn't knew your intention about this, so I did not coded it, but it is
* quite simple to do, if you think it should. -Dan
*/
static void
cascadeWindow(WScreen *scr, WWindow *wwin, int *x_ret, int *y_ret,
unsigned int width, unsigned int height, int h)
{
unsigned int extra_height;
unsigned int scr_width;
int xoffset = 0;
scr_width = scr->scr_width;
if (scr->dock && !scr->dock->lowered) {
if (scr->dock->on_right_side) {
scr_width -= wPreferences.icon_size;
} else {
xoffset = wPreferences.icon_size;
}
}
if (wwin->frame)
extra_height = wwin->frame->top_width + wwin->frame->bottom_width;
@@ -429,7 +435,7 @@ cascadeWindow(WScreen *scr, WWindow *wwin, int *x_ret, int *y_ret,
*y_ret = h * scr->cascade_index + Y_ORIGIN;
height += extra_height;
if (width + *x_ret > scr->scr_width || height + *y_ret > scr->scr_height) {
if (width + *x_ret > scr_width || height + *y_ret > scr->scr_height) {
scr->cascade_index = 0;
*x_ret = h*scr->cascade_index + X_ORIGIN;
*y_ret = h*scr->cascade_index + Y_ORIGIN;
@@ -468,11 +474,11 @@ PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
if (scr->dock && !scr->dock->lowered) {
int x2;
x2 = *x_ret + wwin->client.width;
x2 = *x_ret + width;
if (scr->dock->on_right_side
&& x2 > scr->scr_width - wPreferences.icon_size -
DOCK_EXTRA_SPACE)
*x_ret = scr->scr_width - wwin->client.width
*x_ret = scr->scr_width - width
- wPreferences.icon_size - DOCK_EXTRA_SPACE;
else if (!scr->dock->on_right_side &&
X_ORIGIN < wPreferences.icon_size + DOCK_EXTRA_SPACE)
@@ -484,8 +490,8 @@ PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
{
int w, h;
w = (scr->scr_width-wwin->client.width);
h = (scr->scr_height-wwin->client.height);
w = (scr->scr_width - width);
h = (scr->scr_height - height);
if (w<1) w = 1;
if (h<1) h = 1;
*x_ret = rand()%w;
@@ -493,11 +499,11 @@ PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
if (scr->dock && !scr->dock->lowered) {
int x2;
x2 = *x_ret + wwin->client.width;
x2 = *x_ret + width;
if (scr->dock->on_right_side
&& x2 > scr->scr_width - wPreferences.icon_size -
DOCK_EXTRA_SPACE)
*x_ret = scr->scr_width - wwin->client.width
*x_ret = scr->scr_width - width
- wPreferences.icon_size - DOCK_EXTRA_SPACE;
else if (!scr->dock->on_right_side
&& *x_ret < wPreferences.icon_size)
@@ -516,13 +522,13 @@ PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
if (*x_ret < 0)
*x_ret = 0;
else if (*x_ret + wwin->client.width > scr->scr_width)
*x_ret = scr->scr_width - wwin->client.width;
else if (*x_ret + width > scr->scr_width)
*x_ret = scr->scr_width - width;
if (*y_ret < 0)
*y_ret = 0;
else if (*y_ret + wwin->client.height > scr->scr_height)
*y_ret = scr->scr_height - wwin->client.height;
else if (*y_ret + height > scr->scr_height)
*y_ret = scr->scr_height - height;
}

View File

@@ -120,7 +120,7 @@ PropGetGNUstepWMAttr(Window window, GNUstepWMAttributes **attr)
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
CARD32 *data;
unsigned long *data;
if (XGetWindowProperty(dpy, window, _XA_GNUSTEP_WM_ATTR, 0, 9,
False, _XA_GNUSTEP_WM_ATTR,
@@ -161,7 +161,7 @@ PropGetMotifWMHints(Window window, MWMHints **mwmhints)
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
CARD32 *data;
unsigned long *data;
if (XGetWindowProperty(dpy, window, _XA_MOTIF_WM_HINTS, 0,
PROP_MWM_HINTS_ELEMENTS,

View File

@@ -66,6 +66,7 @@ extern Cursor wCursor[WCUR_LAST];
extern WPreferences wPreferences;
extern Atom _XA_WINDOWMAKER_STATE;
extern int wScreenCount;
extern WDDomain *WDWindowMaker;
@@ -282,14 +283,23 @@ allocGCs(WScreen *scr)
/* frame GC */
wGetColor(scr, DEF_FRAME_COLOR, &color);
gcv.foreground = color.pixel;
gcv.function = GXxor;
/* this will raise the probability of the XORed color being different
* of the original color in PseudoColor when not all color cells are
* initialized */
if (DefaultVisual(dpy, scr->screen)->class==PseudoColor)
gcv.plane_mask = (1<<(scr->depth-1))|1;
else
gcv.plane_mask = AllPlanes;
gcv.foreground = color.pixel;
if (gcv.foreground == 0)
gcv.foreground = 1;
gcv.line_width = DEF_FRAME_THICKNESS;
gcv.subwindow_mode = IncludeInferiors;
gcv.graphics_exposures = False;
scr->frame_gc = XCreateGC(dpy, scr->root_win, GCForeground|GCGraphicsExposures
|GCFunction|GCSubwindowMode|GCLineWidth, &gcv);
|GCFunction|GCSubwindowMode|GCLineWidth
|GCPlaneMask, &gcv);
/* line GC */
gcv.foreground = color.pixel;
@@ -536,7 +546,7 @@ wScreenInit(int screen_number)
long event_mask;
WMColor *color;
XErrorHandler oldHandler;
scr = wmalloc(sizeof(WScreen));
memset(scr, 0, sizeof(WScreen));
@@ -553,7 +563,7 @@ wScreenInit(int screen_number)
oldHandler = XSetErrorHandler((XErrorHandler)alreadyRunningError);
event_mask = EVENT_MASK;
if (wPreferences.disable_root_mouse)
event_mask &= ~(ButtonPressMask|ButtonReleaseMask);
XSelectInput(dpy, scr->root_win, event_mask);

View File

@@ -95,6 +95,8 @@ typedef struct _WScreen {
* Use this list if you want to
* traverse the entire window list
*/
struct LinkedList *selected_windows;
struct WAppIcon *app_icon_list; /* list of all app-icons on screen */
@@ -242,11 +244,14 @@ typedef struct _WScreen {
WMHandlerID *autoRaiseTimer;
Window autoRaiseWindow; /* window that is scheduled to be
* raised */
/* for window shortcuts */
struct WWindow *shortcutWindow[4];
#ifdef XDE_DND
char *xdestring;
#endif
struct {
unsigned int startup:1; /* during window manager startup */
unsigned int regenerate_icon_textures:1;
@@ -257,6 +262,8 @@ typedef struct _WScreen {
unsigned int supports_tiff:1;
unsigned int clip_balloon_mapped:1;
unsigned int next_click_is_not_double:1;
/* some client has issued a WM_COLORMAP_NOTIFY */
unsigned int colormap_stuff_blocked:1;
} flags;
} WScreen;

View File

@@ -1,8 +1,8 @@
/*
* Window Maker window manager
*
*
* Copyright (c) 1997, 1998 Alfredo K. Kojima
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -102,6 +102,7 @@ extern Atom _XA_WM_DELETE_WINDOW;
extern Atom _XA_WM_SAVE_YOURSELF;
extern Atom _XA_WM_CLIENT_LEADER;
extern Atom _XA_WM_COLORMAP_WINDOWS;
extern Atom _XA_WM_COLORMAP_NOTIFY;
extern Atom _XA_GNUSTEP_WM_ATTR;
@@ -588,6 +589,9 @@ StartUp(Bool defaultScreenOnly)
wWinContext = XUniqueContext();
wAppWinContext = XUniqueContext();
wStackContext = XUniqueContext();
/* _XA_VERSION = XInternAtom(dpy, "VERSION", False);*/
_XA_WM_STATE = XInternAtom(dpy, "WM_STATE", False);
_XA_WM_CHANGE_STATE = XInternAtom(dpy, "WM_CHANGE_STATE", False);
_XA_WM_PROTOCOLS = XInternAtom(dpy, "WM_PROTOCOLS", False);
@@ -596,7 +600,8 @@ StartUp(Bool defaultScreenOnly)
_XA_WM_SAVE_YOURSELF = XInternAtom(dpy, "WM_SAVE_YOURSELF", False);
_XA_WM_CLIENT_LEADER = XInternAtom(dpy, "WM_CLIENT_LEADER", False);
_XA_WM_COLORMAP_WINDOWS = XInternAtom(dpy, "WM_COLORMAP_WINDOWS", False);
_XA_WM_COLORMAP_NOTIFY = XInternAtom(dpy, "WM_COLORMAP_NOTIFY", False);
_XA_GNUSTEP_WM_ATTR = XInternAtom(dpy, GNUSTEP_WM_ATTR_NAME, False);
#ifdef MWM_HINTS
_XA_MOTIF_WM_HINTS = XInternAtom(dpy, "_MOTIF_WM_HINTS", False);

View File

@@ -64,20 +64,8 @@ focusWindow(WMenu *menu, WMenuEntry *entry)
wwin = (WWindow*)entry->clientdata;
scr = wwin->screen_ptr;
wWorkspaceChange(menu->frame->screen_ptr, wwin->frame->workspace);
if (wwin->flags.shaded) {
wUnshadeWindow(wwin);
}
if (wwin->flags.hidden) {
wUnhideApplication(wApplicationOf(wwin->main_window), False, False);
} else if (wwin->flags.miniaturized) {
wDeiconifyWindow(wwin);
} else {
wSetFocusTo(menu->frame->screen_ptr, wwin);
wRaiseFrame(wwin->frame->core);
}
wMakeWindowVisible(wwin);
x = wwin->frame_x;
y = wwin->frame_y;

View File

@@ -277,9 +277,12 @@
#define HIDE_ANIMATION_STEPS (MINIATURIZE_ANIMATION_STEPS*2/3)
/* delay before balloon is showed */
#define BALLOON_DELAY 1000
/* delay for menu item selection hysteresis */
#define MENU_SELECT_DELAY 300
/* animation speed constants */
/* icon slide */
@@ -466,6 +469,10 @@
#endif
#ifdef XKB_MODELOCK
#define KEEP_XKB_LOCK_STATUS
#endif
#if HAVE_LIBINTL_H && I18N
# include <libintl.h>
# define _(text) gettext(text)

View File

@@ -277,9 +277,12 @@
#define HIDE_ANIMATION_STEPS (MINIATURIZE_ANIMATION_STEPS*2/3)
/* delay before balloon is showed */
#define BALLOON_DELAY 1000
/* delay for menu item selection hysteresis */
#define MENU_SELECT_DELAY 300
/* animation speed constants */
/* icon slide */
@@ -466,6 +469,10 @@
#endif
#ifdef XKB_MODELOCK
#define KEEP_XKB_LOCK_STATUS
#endif
#if HAVE_LIBINTL_H && I18N
# include <libintl.h>
# define _(text) gettext(text)

View File

@@ -27,10 +27,14 @@
#ifdef SHAPE
#include <X11/extensions/shape.h>
#endif
#ifdef KEEP_XKB_LOCK_STATUS
# include <X11/XKBlib.h>
#endif /* KEEP_XKB_LOCK_STATUS */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "WindowMaker.h"
#include "GNUstep.h"
#ifdef MWM_HINTS
@@ -146,7 +150,7 @@ wWindowFor(Window window)
}
WWindow *
WWindow*
wWindowCreate()
{
WWindow *wwin;
@@ -167,8 +171,16 @@ wWindowCreate()
void
wWindowDestroy(WWindow *wwin)
{
int i;
wwin->flags.destroyed = 1;
for (i = 0; i < 4; i++) {
if (wwin->screen_ptr->shortcutWindow[i] == wwin) {
wwin->screen_ptr->shortcutWindow[i] = NULL;
}
}
if (wwin->normal_hints)
free(wwin->normal_hints);
@@ -835,6 +847,7 @@ wManageWindow(WScreen *scr, Window window)
XReparentWindow(dpy, wwin->client_win, wwin->frame->core->window,
0, wwin->frame->top_width);
#if 0
{
int gx, gy;
@@ -846,7 +859,7 @@ wManageWindow(WScreen *scr, Window window)
if (gy > 0)
y -= wwin->frame->top_width + wwin->frame->bottom_width;
}
#endif
/*
* wWindowConfigure() will init the client window's size
* (wwin->client.{width,height}) and all other geometry
@@ -1046,6 +1059,7 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner,
wwin->window_flags.omnipresent = 1;
wwin->window_flags.no_shadeable = 1;
wwin->window_flags.no_resizable = 1;
wwin->window_flags.no_miniaturizable = 1;
wwin->focus_mode = WFM_PASSIVE;
@@ -1186,12 +1200,19 @@ wUnmanageWindow(WWindow *wwin, int restore)
WWindow *pwin = wwin->inspector->frame; /* the inspector window */
(*pwin->frame->on_click_right)(NULL, pwin, NULL);
}
/* Close window menu if it's open for this window */
if (wwin->flags.menu_open_for_me) {
CloseWindowMenu(scr);
}
if (!wwin->flags.internal_window)
XRemoveFromSaveSet(dpy, wwin->client_win);
XSelectInput(dpy, wwin->client_win, NoEventMask);
XUnmapWindow(dpy, frame->window);
/* deselect window */
if (wwin->flags.selected)
wSelectWindow(wwin);
wSelectWindow(wwin, False);
/* remove all pending events on window */
/* I think this only matters for autoraise */
@@ -1289,7 +1310,15 @@ wUnmanageWindow(WWindow *wwin, int restore)
void
wWindowFocus(WWindow *wwin)
{
{
#ifdef KEEP_XKB_LOCK_STATUS
if (wPreferences.modelock) {
if (!wwin->flags.focused) {
XkbLockGroup(dpy, XkbUseCoreKbd, wwin->languagemode);
}
}
#endif /* KEEP_XKB_LOCK_STATUS */
wFrameWindowChangeState(wwin->frame, WS_FOCUSED);
wwin->flags.focused=1;
@@ -1312,6 +1341,17 @@ wWindowMap(WWindow *wwin)
void
wWindowUnfocus(WWindow *wwin)
{
#ifdef KEEP_XKB_LOCK_STATUS
static XkbStateRec staterec;
if (wPreferences.modelock) {
if (wwin->flags.focused) {
XkbGetState(dpy,XkbUseCoreKbd,&staterec);
wwin->languagemode=staterec.compat_state&32?1:0;
XkbLockGroup(dpy,XkbUseCoreKbd,0); /* reset to workspace */
}
}
#endif /* KEEP_XKB_LOCK_STATUS */
CloseWindowMenu(wwin->screen_ptr);
wFrameWindowChangeState(wwin->frame, wwin->flags.semi_focused
@@ -2275,7 +2315,7 @@ titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event)
if (event->xbutton.state & ShiftMask) {
dir |= MAX_HORIZONTAL;
if (!(event->xbutton.state & ControlMask))
wSelectWindow(wwin);
wSelectWindow(wwin, !wwin->flags.selected);
}
/* maximize window */
@@ -2291,8 +2331,8 @@ titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event)
wHideOtherApplications(wwin);
}
} else if (event->xbutton.button==Button2) {
wSelectWindow(wwin);
}
wSelectWindow(wwin, !wwin->flags.selected);
}
}
@@ -2368,20 +2408,9 @@ titlebarMouseDown(WCoreWindow *sender, void *data, XEvent *event)
}
if ((event->xbutton.state & ShiftMask)
&& !(event->xbutton.state & ControlMask)) {
wSelectWindow(wwin);
wSelectWindow(wwin, !wwin->flags.selected);
return;
}
#if 0
if (XGrabPointer(dpy, wwin->frame->titlebar->window, False,
ButtonMotionMask|ButtonReleaseMask|ButtonPressMask,
GrabModeAsync, GrabModeAsync, None,
None, CurrentTime)!=GrabSuccess) {
#ifdef DEBUG0
wwarning("pointer grab failed for window move");
#endif
return;
}
#endif
/* move the window */
wMouseMoveWindow(wwin, event);
XUngrabPointer(dpy, CurrentTime);

View File

@@ -187,6 +187,10 @@ typedef struct WWindow {
FocusMode focus_mode; /* type of keyboard input focus */
#ifdef KEEP_XKB_LOCK_STATUS
int languagemode;
#endif /* KEEP_XKB_LOCK_STATUS */
#ifdef MONITOR_HEARTBEAT
time_t last_beat;
#endif
@@ -223,6 +227,8 @@ typedef struct WWindow {
unsigned int inspector_open:1; /* attrib inspector is already open */
unsigned int destroyed:1; /* window was already destroyed */
unsigned int menu_open_for_me:1; /* window commands menu */
} flags; /* state of the window */
struct WIcon *icon; /* icon info for the window */

View File

@@ -47,10 +47,10 @@
#define MC_MINIATURIZE 1
#define MC_SHADE 2
#define MC_HIDE 3
#define MC_HIDE_OTHERS 4
#define MC_SELECT 5
#define MC_DUMMY_MOVETO 6
#define MC_PROPERTIES 7
#define MC_SELECT 4
#define MC_DUMMY_MOVETO 5
#define MC_PROPERTIES 6
#define MC_SHORTCUT 7
#define MC_CLOSE 8
#define MC_KILL 9
@@ -111,7 +111,7 @@ execMenuCommand(WMenu *menu, WMenuEntry *entry)
wShadeWindow(wwin);
break;
case MC_SELECT:
wSelectWindow(wwin);
wSelectWindow(wwin, !wwin->flags.selected);
break;
case MC_PROPERTIES:
if (wwin->wm_class || wwin->wm_instance)
@@ -122,9 +122,6 @@ execMenuCommand(WMenu *menu, WMenuEntry *entry)
wapp = wApplicationOf(wwin->main_window);
wHideApplication(wapp);
break;
case MC_HIDE_OTHERS:
wHideOtherApplications(wwin);
break;
}
}
@@ -134,12 +131,26 @@ switchWSCommand(WMenu *menu, WMenuEntry *entry)
{
WWindow *wwin = (WWindow*)entry->clientdata;
if (wwin->flags.selected)
wSelectWindow(wwin);
wSelectWindow(wwin, False);
wWindowChangeWorkspace(wwin, entry->order);
}
static void
makeShortcutCommand(WMenu *menu, WMenuEntry *entry)
{
WWindow *wwin = (WWindow*)entry->clientdata;
wwin->screen_ptr->shortcutWindow[entry->order] = wwin;
wSelectWindow(wwin, !wwin->flags.selected);
XFlush(dpy);
wusleep(3000);
wSelectWindow(wwin, !wwin->flags.selected);
XFlush(dpy);
}
static void
updateWorkspaceMenu(WMenu *menu)
{
@@ -172,20 +183,94 @@ updateWorkspaceMenu(WMenu *menu)
}
static void
updateMakeShortcutMenu(WMenu *menu, WWindow *wwin)
{
WMenu *smenu = menu->cascades[menu->entries[MC_SHORTCUT]->cascade];
int i;
char *buffer;
KeyCode kcode;
if (!smenu)
return;
buffer = wmalloc(strlen(_("Shortcut"))+16);
for (i=0; i<smenu->entry_no; i++) {
char *tmp;
WWindow *twin = wwin->screen_ptr->shortcutWindow[i];
WMenuEntry *entry = smenu->entries[i];
sprintf(buffer, "%s %s %i", twin ? (twin == wwin ? "+" : "-" ) : " ",
_("Shortcut"), i+1);
if (strcmp(buffer, entry->text)!=0) {
free(entry->text);
entry->text = wstrdup(buffer);
smenu->flags.realized = 0;
}
kcode = wKeyBindings[WKBD_WINDOW1+i].keycode;
if (kcode) {
if ((tmp = XKeysymToString(XKeycodeToKeysym(dpy, kcode, 0)))
&& (!entry->rtext || strcmp(tmp, entry->rtext)!=0)) {
if (entry->rtext)
free(entry->rtext);
entry->rtext = wstrdup(tmp);
smenu->flags.realized = 0;
}
wMenuSetEnabled(smenu, i, True);
} else {
wMenuSetEnabled(smenu, i, False);
if (entry->rtext) {
free(entry->rtext);
entry->rtext = NULL;
smenu->flags.realized = 0;
}
}
entry->clientdata = wwin;
}
free(buffer);
if (!smenu->flags.realized)
wMenuRealize(smenu);
}
static WMenu*
makeWorkspaceMenu(WScreen *scr)
{
WMenu *menu;
menu = wMenuCreate(scr, NULL, False);
if (!menu)
wwarning(_("could not create workspace submenu for window menu"));
if (!menu) {
wwarning(_("could not create submenu for window menu"));
return NULL;
}
updateWorkspaceMenu(menu);
return menu;
}
static WMenu*
makeMakeShortcutMenu(WScreen *scr)
{
WMenu *menu;
menu = wMenuCreate(scr, NULL, False);
if (!menu) {
wwarning(_("could not create submenu for window menu"));
return NULL;
}
wMenuAddCallback(menu, "", makeShortcutCommand, NULL);
wMenuAddCallback(menu, "", makeShortcutCommand, NULL);
wMenuAddCallback(menu, "", makeShortcutCommand, NULL);
wMenuAddCallback(menu, "", makeShortcutCommand, NULL);
return menu;
}
static WMenu*
createWindowMenu(WScreen *scr)
@@ -233,23 +318,25 @@ createWindowMenu(WScreen *scr)
if (kcode && (tmp = XKeysymToString(XKeycodeToKeysym(dpy, kcode, 0))))
entry->rtext = wstrdup(tmp);
}
entry = wMenuAddCallback(menu, _("Hide Others"), execMenuCommand, NULL);
entry = wMenuAddCallback(menu, _("Select"), execMenuCommand, NULL);
if (wKeyBindings[WKBD_SELECT].keycode!=0) {
kcode = wKeyBindings[WKBD_SELECT].keycode;
if (kcode && (tmp = XKeysymToString(XKeycodeToKeysym(dpy, kcode, 0))))
entry->rtext = wstrdup(tmp);
}
entry = wMenuAddCallback(menu, _("Move To"), NULL, NULL);
scr->workspace_submenu = makeWorkspaceMenu(scr);
if (scr->workspace_submenu)
wMenuEntrySetCascade(menu, entry, scr->workspace_submenu);
entry = wMenuAddCallback(menu, _("Attributes..."), execMenuCommand, NULL);
entry = wMenuAddCallback(menu, _("Select Shortcut"), NULL, NULL);
wMenuEntrySetCascade(menu, entry, makeMakeShortcutMenu(scr));
entry = wMenuAddCallback(menu, _("Close"), execMenuCommand, NULL);
if (wKeyBindings[WKBD_CLOSE].keycode!=0) {
kcode = wKeyBindings[WKBD_CLOSE].keycode;
@@ -266,9 +353,17 @@ createWindowMenu(WScreen *scr)
void
CloseWindowMenu(WScreen *scr)
{
if (scr->window_menu && scr->window_menu->flags.mapped)
wMenuUnmap(scr->window_menu);
if (scr->window_menu) {
if (scr->window_menu->flags.mapped)
wMenuUnmap(scr->window_menu);
if (scr->window_menu->entries[0]->clientdata) {
WWindow *wwin = (WWindow*)scr->window_menu->entries[0]->clientdata;
wwin->flags.menu_open_for_me = 0;
}
scr->window_menu->entries[0]->clientdata = NULL;
}
}
@@ -280,11 +375,14 @@ OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard)
WScreen *scr = wwin->screen_ptr;
int i;
wwin->flags.menu_open_for_me = 1;
if (!scr->window_menu) {
scr->window_menu = createWindowMenu(scr);
} else {
updateWorkspaceMenu(scr->workspace_submenu);
}
menu = scr->window_menu;
if (menu->flags.mapped) {
wMenuUnmap(menu);
@@ -292,6 +390,8 @@ OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard)
return;
}
}
updateMakeShortcutMenu(menu, wwin);
wMenuSetEnabled(menu, MC_HIDE, wapp!=NULL
&& !wapp->main_window_desc->window_flags.no_appicon);
@@ -316,6 +416,7 @@ OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard)
for (i = 0; i < menu->entry_no; i++) {
menu->entries[i]->clientdata = wwin;
}
for (i = 0; i < scr->workspace_submenu->entry_no; i++) {
scr->workspace_submenu->entries[i]->clientdata = wwin;
if (i == scr->current_workspace) {

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -9,7 +9,8 @@ bin_SCRIPTS = wmaker.inst wm-oldmenu2new
EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new
INCLUDES = @DFLAGS@ @XCFLAGS@ -I$(top_srcdir)/wrlib -I$(top_srcdir)/libPropList @GFXFLAGS@
INCLUDES = @DFLAGS@ -I$(top_srcdir)/wrlib -I$(top_srcdir)/libPropList\
@XCFLAGS@ @GFXFLAGS@
# X_EXTRA_LIBS is for libproplist in systems that need -lsocket
liblist= -L$(top_builddir)/libPropList -lPropList @X_EXTRA_LIBS@
@@ -30,7 +31,8 @@ seticons_LDADD= $(liblist)
geticonset_LDADD= $(liblist)
wmsetbg_LDADD = -L$(top_builddir)/libPropList -lPropList \
-L$(top_builddir)/wrlib -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
-L$(top_builddir)/wrlib -lwraster \
@GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
getstyle_SOURCES = getstyle.c

View File

@@ -61,6 +61,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@
@@ -97,7 +98,8 @@ bin_SCRIPTS = wmaker.inst wm-oldmenu2new
EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new
INCLUDES = @DFLAGS@ @XCFLAGS@ -I$(top_srcdir)/wrlib -I$(top_srcdir)/libPropList @GFXFLAGS@
INCLUDES = @DFLAGS@ -I$(top_srcdir)/wrlib -I$(top_srcdir)/libPropList\
@XCFLAGS@ @GFXFLAGS@
# X_EXTRA_LIBS is for libproplist in systems that need -lsocket
liblist= -L$(top_builddir)/libPropList -lPropList @X_EXTRA_LIBS@
@@ -117,7 +119,8 @@ seticons_LDADD= $(liblist)
geticonset_LDADD= $(liblist)
wmsetbg_LDADD = -L$(top_builddir)/libPropList -lPropList \
-L$(top_builddir)/wrlib -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
-L$(top_builddir)/wrlib -lwraster \
@GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
getstyle_SOURCES = getstyle.c

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@

View File

@@ -35,21 +35,23 @@ libwraster_a_SOURCES = \
INCLUDES = @DFLAGS@ @XCFLAGS@ @GFXFLAGS@ @XSHM@
LIBLIST = -L. -lwraster @GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
view_SOURCES= view.c
view_LDADD = -L. -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
view_LDADD = $(LIBLIST)
test_SOURCES = test.c
test_LDADD = -L. -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
test_LDADD = $(LIBLIST)
testgrad_SOURCES = testgrad.c
testgrad_LDADD = -L. -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
testgrad_LDADD = $(LIBLIST)
testdraw_SOURCES = testdraw.c
testdraw_LDADD = -L. -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
testdraw_LDADD = $(LIBLIST)
libwraster_a_LIBADD = @ALLOCA@

View File

@@ -63,6 +63,7 @@ CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
GFXFLAGS = @GFXFLAGS@
GFXLFLAGS = @GFXLFLAGS@
GFXLIBS = @GFXLIBS@
I18N = @I18N@
I18N_MB = @I18N_MB@
@@ -123,21 +124,23 @@ libwraster_a_SOURCES = \
INCLUDES = @DFLAGS@ @XCFLAGS@ @GFXFLAGS@ @XSHM@
LIBLIST = -L. -lwraster @GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
view_SOURCES= view.c
view_LDADD = -L. -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
view_LDADD = $(LIBLIST)
test_SOURCES = test.c
test_LDADD = -L. -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
test_LDADD = $(LIBLIST)
testgrad_SOURCES = testgrad.c
testgrad_LDADD = -L. -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
testgrad_LDADD = $(LIBLIST)
testdraw_SOURCES = testdraw.c
testdraw_LDADD = -L. -lwraster @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
testdraw_LDADD = $(LIBLIST)
libwraster_a_LIBADD = @ALLOCA@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs

View File

@@ -494,8 +494,16 @@ RCreateContext(Display *dpy, int screen_number, RContextAttributes *attribs)
}
if (context->attribs->use_shared_memory) {
if (!XShmQueryExtension(context->dpy)) {
int major, minor;
Bool sharedPixmaps;
context->flags.use_shared_pixmap = 0;
if (!XShmQueryVersion(context->dpy, &major, &minor, &sharedPixmaps)) {
context->attribs->use_shared_memory = False;
} else {
if (XShmPixmapFormat(context->dpy)==ZPixmap)
context->flags.use_shared_pixmap = sharedPixmaps;
}
}
#endif

View File

@@ -613,7 +613,10 @@ RConvertImage(RContext *context, RImage *image, Pixmap *pixmap)
image->height, context->depth);
#ifdef XSHM
tmp = R_CreateXImageMappedPixmap(context, ximg);
if (context->flags.use_shared_pixmap)
tmp = R_CreateXImageMappedPixmap(context, ximg);
else
tmp = None;
if (tmp) {
/*
* We have to copy the shm Pixmap into a normal Pixmap because

View File

@@ -203,6 +203,5 @@ void main(int argc, char **argv)
XFlush(dpy);
#endif
getchar();
}

View File

@@ -114,6 +114,10 @@ typedef struct RContext {
/* only used for pseudocolor and grayscale */
int ncolors; /* total number of colors we can use */
XColor *colors; /* internal colormap */
struct {
unsigned int use_shared_pixmap:1;
} flags;
} RContext;

View File

@@ -124,7 +124,7 @@ RCreateXImage(RContext *context, int depth, unsigned width, unsigned height)
}
rximg->info.shmaddr = shmat(rximg->info.shmid, 0, 0);
if ((int)rximg->info.shmaddr < 0) {
if (rximg->info.shmaddr == (void*)-1) {
context->attribs->use_shared_memory = 0;
if (shmctl(rximg->info.shmid, IPC_RMID, 0) < 0)
perror("wrlib:shmctl");
@@ -217,3 +217,4 @@ R_CreateXImageMappedPixmap(RContext *context, RXImage *rximage)
}
#endif /* XSHM */