From 59eb9475398e37929dbda4f3bcb9165cce7a3678 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 3 Nov 1998 12:53:26 +0000 Subject: [PATCH] Bug fixes for 0.20.3 pre-release 2 --- AUTHORS | 15 +- ChangeLog | 25 ++ INSTALL | 48 +-- Install | 33 +- Makefile.in | 1 + NEWS | 37 +++ README | 49 ++- TODO | 15 +- WINGs/Makefile.am | 7 +- WINGs/Makefile.in | 8 +- WINGs/Resources/Makefile.in | 1 + WINGs/mywidget.c | 8 +- WINGs/wevent.c | 4 + WINGs/widgets.c | 6 +- WPrefs.app/KeyboardShortcuts.c | 16 + WPrefs.app/Makefile.am | 4 +- WPrefs.app/Makefile.in | 4 +- WPrefs.app/Preferences.c | 18 +- WPrefs.app/WPrefs.c | 2 +- WPrefs.app/WPrefs.h | 2 +- WPrefs.app/po/Makefile.am | 2 + WPrefs.app/po/Makefile.in | 1 + WPrefs.app/po/README | 2 +- WPrefs.app/tiff/Makefile.in | 1 + WPrefs.app/xpm/Makefile.in | 1 + WindowMaker/Backgrounds/Makefile.in | 1 + WindowMaker/Defaults/Makefile.in | 1 + WindowMaker/Defaults/WMState | 2 +- WindowMaker/Defaults/WMState.in | 2 +- WindowMaker/IconSets/Makefile.in | 1 + WindowMaker/Icons/Makefile.in | 1 + WindowMaker/Makefile.in | 1 + WindowMaker/Pixmaps/Makefile.in | 1 + WindowMaker/Styles/Makefile.in | 1 + WindowMaker/Themes/Makefile.in | 1 + configure | 469 +++++++++++++++------------- configure.in | 66 ++-- doc/Makefile.in | 1 + po/Makefile.in | 1 + src/Makefile.am | 4 +- src/Makefile.in | 5 +- src/WindowMaker.h | 4 + src/actions.c | 50 ++- src/actions.h | 6 +- src/balloon.c | 6 +- src/client.c | 17 +- src/colormap.c | 27 +- src/config.h | 2 +- src/defaults.c | 20 ++ src/dock.c | 28 +- src/event.c | 107 ++++--- src/funcs.h | 10 +- src/icon.c | 2 +- src/keybind.h | 14 +- src/main.c | 1 + src/menu.c | 105 ++++++- src/misc.c | 140 ++++++++- src/moveres.c | 71 ++--- src/placement.c | 38 ++- src/properties.c | 4 +- src/screen.c | 20 +- src/screen.h | 9 +- src/startup.c | 11 +- src/switchmenu.c | 14 +- src/wconfig.h | 9 +- src/wconfig.h.in | 9 +- src/window.c | 71 +++-- src/window.h | 6 + src/winmenu.c | 137 ++++++-- test/Makefile.in | 1 + util/Makefile.am | 6 +- util/Makefile.in | 7 +- wmlib/Makefile.in | 1 + wrlib/Makefile.am | 10 +- wrlib/Makefile.in | 11 +- wrlib/context.c | 10 +- wrlib/convert.c | 5 +- wrlib/testgrad.c | 1 - wrlib/wraster.h | 4 + wrlib/xutil.c | 3 +- 80 files changed, 1280 insertions(+), 585 deletions(-) diff --git a/AUTHORS b/AUTHORS index 5a213570..68c7fe93 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -Information about locale translators is at src/po/README and +Bjoern Giesler 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 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 flipping iconification animation Phillip Smith -FTP and WWW site provider/maintainer +FTP, WWW, mailing list site provider/maintainer (Net logistics) Lauri Tarkkala SIGHUP unblock bug fix @@ -164,10 +165,10 @@ Sam Varner many fixes and enhancements for move, resize and window placement code. Marco van Hylckama Vlieg -house icon for WINGs file dialogs, defaullAppIcon and Clip xpm icon +house icon for WINGs file dialogs, defaultAppIcon and Clip xpm icon David Wang -edge resistance +edge resistance, 8bpp balloon bug fix, other 8bpp related fixes Yoav Yerushalmi Fixed -visualid for screens that can do multiple depths. Another fix in @@ -177,10 +178,12 @@ FRBall dgradient fix "]d" -Window list menu miniaturized/hidden hints, XDE support +Window list menu miniaturized/hidden hints, XDE support, XKB lock +language status Trae Mc Combs BlueWaves.jpeg background image in BlueWaves theme. And a special thanks to Martin Eskildsen for giving me his copy of NEXTSTEP :-) + diff --git a/ChangeLog b/ChangeLog index 62411bbe..e03f33d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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: ............................. diff --git a/INSTALL b/INSTALL index 12d2bf84..5e9416b2 100644 --- a/INSTALL +++ b/INSTALL @@ -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 diff --git a/Install b/Install index 9942ce4f..56c21b95 100755 --- a/Install +++ b/Install @@ -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] " -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 "--------------------------" diff --git a/Makefile.in b/Makefile.in index 040104ed..53071f33 100644 --- a/Makefile.in +++ b/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/NEWS b/NEWS index d12fc4c7..14ae596f 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/README b/README index 9560af59..73c593dc 100644 --- a/README +++ b/README @@ -1,21 +1,35 @@ - Window Maker X11 Window Manager + Window Maker X11 Window Manager - - + + - Alfredo K. Kojima - + Alfredo K. Kojima - Dan Pascu - + Dan Pascu - Matthew Hawkins - + 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 +Dan Pascu +Matt Hawkins + +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 ========= diff --git a/TODO b/TODO index 16d49894..ec735250 100644 --- a/TODO +++ b/TODO @@ -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... + + diff --git a/WINGs/Makefile.am b/WINGs/Makefile.am index 99c65704..3fc5ea61 100644 --- a/WINGs/Makefile.am +++ b/WINGs/Makefile.am @@ -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@ diff --git a/WINGs/Makefile.in b/WINGs/Makefile.in index a1e0336f..1ac7430a 100644 --- a/WINGs/Makefile.in +++ b/WINGs/Makefile.in @@ -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 = diff --git a/WINGs/Resources/Makefile.in b/WINGs/Resources/Makefile.in index 8930bd8b..5e3a95a4 100644 --- a/WINGs/Resources/Makefile.in +++ b/WINGs/Resources/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WINGs/mywidget.c b/WINGs/mywidget.c index b7f1c250..d551b2a7 100644 --- a/WINGs/mywidget.c +++ b/WINGs/mywidget.c @@ -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. + * */ diff --git a/WINGs/wevent.c b/WINGs/wevent.c index 6c992e63..aff5591c 100644 --- a/WINGs/wevent.c +++ b/WINGs/wevent.c @@ -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--; + } } } diff --git a/WINGs/widgets.c b/WINGs/widgets.c index 99649c13..828effa9 100644 --- a/WINGs/widgets.c +++ b/WINGs/widgets.c @@ -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); diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c index 4f168427..e3756b6e 100644 --- a/WPrefs.app/KeyboardShortcuts.c +++ b/WPrefs.app/KeyboardShortcuts.c @@ -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); diff --git a/WPrefs.app/Makefile.am b/WPrefs.app/Makefile.am index a8334833..88ab3473 100644 --- a/WPrefs.app/Makefile.am +++ b/WPrefs.app/Makefile.am @@ -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 + diff --git a/WPrefs.app/Makefile.in b/WPrefs.app/Makefile.in index faf9b064..d1bfe18f 100644 --- a/WPrefs.app/Makefile.in +++ b/WPrefs.app/Makefile.in @@ -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@ \ diff --git a/WPrefs.app/Preferences.c b/WPrefs.app/Preferences.c index 900f4ce1..a8f181aa 100644 --- a/WPrefs.app/Preferences.c +++ b/WPrefs.app/Preferences.c @@ -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); diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c index 574c133b..553218be 100644 --- a/WPrefs.app/WPrefs.c +++ b/WPrefs.app/WPrefs.c @@ -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); } diff --git a/WPrefs.app/WPrefs.h b/WPrefs.app/WPrefs.h index b231434d..1c874176 100644 --- a/WPrefs.app/WPrefs.h +++ b/WPrefs.app/WPrefs.h @@ -37,7 +37,7 @@ #include -#define WVERSION "0.6" +#define WVERSION "0.7" #define WMVERSION "0.20.x" diff --git a/WPrefs.app/po/Makefile.am b/WPrefs.app/po/Makefile.am index 2ce570b4..5848894f 100644 --- a/WPrefs.app/po/Makefile.am +++ b/WPrefs.app/po/Makefile.am @@ -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 + diff --git a/WPrefs.app/po/Makefile.in b/WPrefs.app/po/Makefile.in index 538bdf15..64d4ac21 100644 --- a/WPrefs.app/po/Makefile.in +++ b/WPrefs.app/po/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WPrefs.app/po/README b/WPrefs.app/po/README index 3a675504..2d23710a 100644 --- a/WPrefs.app/po/README +++ b/WPrefs.app/po/README @@ -8,5 +8,5 @@ pt.po Portuguese Alfredo K. Kojima hr.po Croatian Toni Bilić fr.po French Bastien NOCERA ko.po Korean Byeong-Chan, Kim -cs.po Czech 3 David Šauer +cs.po Czech David Šauer ja.po Japanese Kazuhide Takahashi diff --git a/WPrefs.app/tiff/Makefile.in b/WPrefs.app/tiff/Makefile.in index e0020b40..5de90db4 100644 --- a/WPrefs.app/tiff/Makefile.in +++ b/WPrefs.app/tiff/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WPrefs.app/xpm/Makefile.in b/WPrefs.app/xpm/Makefile.in index b9818040..2f264379 100644 --- a/WPrefs.app/xpm/Makefile.in +++ b/WPrefs.app/xpm/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WindowMaker/Backgrounds/Makefile.in b/WindowMaker/Backgrounds/Makefile.in index c0b5b00e..37e5f3e6 100755 --- a/WindowMaker/Backgrounds/Makefile.in +++ b/WindowMaker/Backgrounds/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WindowMaker/Defaults/Makefile.in b/WindowMaker/Defaults/Makefile.in index 5d2f9775..5c124ed5 100755 --- a/WindowMaker/Defaults/Makefile.in +++ b/WindowMaker/Defaults/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WindowMaker/Defaults/WMState b/WindowMaker/Defaults/WMState index c2e7ce7c..0038c0e5 100755 --- a/WindowMaker/Defaults/WMState +++ b/WindowMaker/Defaults/WMState @@ -25,7 +25,7 @@ } ); Position = "-64,0"; - Lowered = Yes; + Lowered = No; }; Clip = { Command = "-"; diff --git a/WindowMaker/Defaults/WMState.in b/WindowMaker/Defaults/WMState.in index d4c6ae7e..67847dbe 100644 --- a/WindowMaker/Defaults/WMState.in +++ b/WindowMaker/Defaults/WMState.in @@ -25,7 +25,7 @@ } ); Position = "-64,0"; - Lowered = Yes; + Lowered = No; }; Clip = { Command = "-"; diff --git a/WindowMaker/IconSets/Makefile.in b/WindowMaker/IconSets/Makefile.in index e2ac10ca..6ad27c4e 100755 --- a/WindowMaker/IconSets/Makefile.in +++ b/WindowMaker/IconSets/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WindowMaker/Icons/Makefile.in b/WindowMaker/Icons/Makefile.in index 56b73471..77f46e39 100755 --- a/WindowMaker/Icons/Makefile.in +++ b/WindowMaker/Icons/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WindowMaker/Makefile.in b/WindowMaker/Makefile.in index 0cc99895..4ed8b1c0 100755 --- a/WindowMaker/Makefile.in +++ b/WindowMaker/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WindowMaker/Pixmaps/Makefile.in b/WindowMaker/Pixmaps/Makefile.in index e0434c8c..22d2eb88 100755 --- a/WindowMaker/Pixmaps/Makefile.in +++ b/WindowMaker/Pixmaps/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WindowMaker/Styles/Makefile.in b/WindowMaker/Styles/Makefile.in index 0ae1dfca..7fa054ce 100755 --- a/WindowMaker/Styles/Makefile.in +++ b/WindowMaker/Styles/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/WindowMaker/Themes/Makefile.in b/WindowMaker/Themes/Makefile.in index ec10b161..911f43a3 100755 --- a/WindowMaker/Themes/Makefile.in +++ b/WindowMaker/Themes/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/configure b/configure index 37e61fbb..b1b1a651 100755 --- a/configure +++ b/configure @@ -13,6 +13,8 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --enable-kanji multibyte character support (kanji, Korean etc.)" +ac_help="$ac_help + --enable-modelock XKB keyboard language status support" ac_help="$ac_help --with-nlsdir=PATH specify where the locale stuff should go " ac_help="$ac_help @@ -582,7 +584,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:586: checking for a BSD compatible install" >&5 +echo "configure:588: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -635,7 +637,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:639: checking whether build environment is sane" >&5 +echo "configure:641: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -692,7 +694,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:696: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:698: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -721,7 +723,7 @@ fi PACKAGE=WindowMaker -VERSION=0.20.2 +VERSION=0.20.3 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -738,7 +740,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:742: checking for working aclocal" >&5 +echo "configure:744: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -751,7 +753,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:755: checking for working autoconf" >&5 +echo "configure:757: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -764,7 +766,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:768: checking for working automake" >&5 +echo "configure:770: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -777,7 +779,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:781: checking for working autoheader" >&5 +echo "configure:783: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -790,7 +792,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:794: checking for working makeinfo" >&5 +echo "configure:796: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -806,8 +808,8 @@ fi -WINGS_VER=0.0.1 -WRASTER_VER=0.0.1 +#WINGS_VER=0.0.1 +#WRASTER_VER=0.0.1 subdirs="libPropList" @@ -826,7 +828,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:830: checking host system type" >&5 +echo "configure:832: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -851,7 +853,7 @@ echo "$ac_t""$host" 1>&6 # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:855: checking for $ac_word" >&5 +echo "configure:857: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -880,7 +882,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:884: checking for $ac_word" >&5 +echo "configure:886: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -928,7 +930,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:932: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:934: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -938,11 +940,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -962,12 +964,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:968: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:971: checking whether we are using GNU C" >&5 +echo "configure:973: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -976,7 +978,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -991,7 +993,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:995: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:997: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1019,7 +1021,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1023: checking for POSIXized ISC" >&5 +echo "configure:1025: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1042,7 +1044,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1046: checking for $ac_word" >&5 +echo "configure:1048: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1071,7 +1073,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1075: checking for $ac_word" >&5 +echo "configure:1077: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1119,7 +1121,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1123: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1129,11 +1131,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1153,12 +1155,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1159: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1162: checking whether we are using GNU C" >&5 +echo "configure:1164: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1167,7 +1169,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1182,7 +1184,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1186: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1188: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1210,7 +1212,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1214: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1216: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1239,7 +1241,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1243: checking for $ac_word" >&5 +echo "configure:1245: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1276,7 +1278,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1280: checking for a BSD compatible install" >&5 +echo "configure:1282: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1326,7 +1328,7 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1330: checking whether ln -s works" >&5 +echo "configure:1332: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1347,7 +1349,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1351: checking how to run the C preprocessor" >&5 +echo "configure:1353: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1362,13 +1364,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1379,13 +1381,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1409,13 +1411,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1413: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1415: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1433,7 +1435,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1457,12 +1459,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1461: checking return type of signal handlers" >&5 +echo "configure:1463: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1479,7 +1481,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1498,12 +1500,12 @@ EOF echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1502: checking for vprintf" >&5 +echo "configure:1504: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1550,12 +1552,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1554: checking for _doprnt" >&5 +echo "configure:1556: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -1605,19 +1607,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1609: checking for working alloca.h" >&5 +echo "configure:1611: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1638,12 +1640,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1642: checking for alloca" >&5 +echo "configure:1644: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1698,12 +1700,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1702: checking whether alloca needs Cray hooks" >&5 +echo "configure:1704: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1732: checking for $ac_func" >&5 +echo "configure:1734: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1783,7 +1785,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1787: checking stack direction for C alloca" >&5 +echo "configure:1789: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1791,7 +1793,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -1834,12 +1836,12 @@ fi for ac_func in gethostname gettimeofday select poll strerror strncasecmp setpgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1838: checking for $ac_func" >&5 +echo "configure:1840: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1887,11 +1889,17 @@ fi done +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 -# Extract the first word of "cpp", so it can be a program name with args. +if test "x$CPP_PATH" = x; then + # Extract the first word of "cpp", so it can be a program name with args. set dummy cpp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1895: checking for $ac_word" >&5 +echo "configure:1903: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CPP_PATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1920,6 +1928,7 @@ else echo "$ac_t""no" 1>&6 fi +fi if test "$CPP_PATH" = "/usr/ccs/lib/cpp" -o "$CPP_PATH" = "notfound" ; then if test "$GCC" = "yes"; then @@ -1948,12 +1957,12 @@ INTLIBS="" echo $ac_n "checking for gettext""... $ac_c" 1>&6 -echo "configure:1952: checking for gettext" >&5 +echo "configure:1961: checking for gettext" >&5 if eval "test \"`echo '$''{'ac_cv_func_gettext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gettext=yes" else @@ -1994,7 +2003,7 @@ if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:1998: checking for gettext in -lintl" >&5 +echo "configure:2007: checking for gettext in -lintl" >&5 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2002,7 +2011,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2040,7 +2049,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2044: checking for $ac_word" >&5 +echo "configure:2053: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2144,7 +2153,7 @@ if test "$enable_kanji" = yes; then case $host_os in freebsd*) echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6 -echo "configure:2148: checking for setlocale in -lxpg4" >&5 +echo "configure:2157: checking for setlocale in -lxpg4" >&5 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2152,7 +2161,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lxpg4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2192,6 +2201,15 @@ fi +# Check whether --enable-modelock or --disable-modelock was given. +if test "${enable_modelock+set}" = set; then + enableval="$enable_modelock" + X_CFLAGS="$X_CFLAGS -DXKB_MODELOCK" +fi + + + + # Check whether --with-nlsdir or --without-nlsdir was given. if test "${with_nlsdir+set}" = set; then withval="$with_nlsdir" @@ -2203,7 +2221,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 @@ -2221,7 +2239,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:2225: checking for X" >&5 +echo "configure:2243: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -2283,12 +2301,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2357,14 +2375,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2470,17 +2488,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2474: checking whether -R must be followed by a space" >&5 +echo "configure:2492: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -2496,14 +2514,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -2535,7 +2553,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2539: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2557: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2543,7 +2561,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2576,7 +2594,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2580: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2598: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2584,7 +2602,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2624,12 +2642,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2628: checking for gethostbyname" >&5 +echo "configure:2646: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2673,7 +2691,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2677: checking for gethostbyname in -lnsl" >&5 +echo "configure:2695: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2681,7 +2699,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2722,12 +2740,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2726: checking for connect" >&5 +echo "configure:2744: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2771,7 +2789,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2775: checking for connect in -lsocket" >&5 +echo "configure:2793: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2779,7 +2797,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2814,12 +2832,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2818: checking for remove" >&5 +echo "configure:2836: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2863,7 +2881,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2867: checking for remove in -lposix" >&5 +echo "configure:2885: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2871,7 +2889,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2906,12 +2924,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2910: checking for shmat" >&5 +echo "configure:2928: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2955,7 +2973,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2959: checking for shmat in -lipc" >&5 +echo "configure:2977: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2963,7 +2981,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3007,7 +3025,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:3011: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3029: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3015,7 +3033,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3058,7 +3076,7 @@ XLFLAGS="$X_LIBS" XLIBS="$X_EXTRA_LIBS -lX11" echo $ac_n "checking for _Xsetlocale in -lX11""... $ac_c" 1>&6 -echo "configure:3062: checking for _Xsetlocale in -lX11" >&5 +echo "configure:3080: checking for _Xsetlocale in -lX11" >&5 ac_lib_var=`echo X11'_'_Xsetlocale | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3066,7 +3084,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11 $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3114,7 +3132,7 @@ added_xext=no if test "$shape" = yes; then echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:3118: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:3136: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3122,7 +3140,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3172,7 +3190,7 @@ fi if test "$shm" = yes; then echo $ac_n "checking for XShmAttach in -lXext""... $ac_c" 1>&6 -echo "configure:3176: checking for XShmAttach in -lXext" >&5 +echo "configure:3194: checking for XShmAttach in -lXext" >&5 ac_lib_var=`echo Xext'_'XShmAttach | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3180,7 +3198,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3215,12 +3233,12 @@ fi if test "$ok" = yes; then echo $ac_n "checking for shmget""... $ac_c" 1>&6 -echo "configure:3219: checking for shmget" >&5 +echo "configure:3237: checking for shmget" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmget'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmget=yes" else @@ -3277,12 +3295,13 @@ fi +GFXLIBS="" # Check whether --with-gfx-libs or --without-gfx-libs was given. if test "${with_gfx_libs+set}" = set; then withval="$with_gfx_libs" - GFXLIBS="$withval" GFX_LIB_PATH=$withval + GFXLFLAGS=$withval else - GFXLIBS="" GFX_LIB_PATH="" + GFXLFLAGS="" fi @@ -3310,15 +3329,15 @@ fi if test "$xpm" = yes; then echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6 -echo "configure:3314: checking for XpmCreatePixmapFromData in -lXpm" >&5 +echo "configure:3333: checking for XpmCreatePixmapFromData in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lXpm $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $XLIBS $LIBS" +LIBS="-lXpm $GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3356,17 +3375,17 @@ fi CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS" ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6 -echo "configure:3360: checking for X11/xpm.h" >&5 +echo "configure:3379: checking for X11/xpm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3404,15 +3423,15 @@ fi echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 -echo "configure:3408: checking for gzread in -lz" >&5 +echo "configure:3427: checking for gzread in -lz" >&5 ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lz $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $LIBS" +LIBS="-lz $GFX_INC_PATH $GFXLFLAGS $XLFLAGS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3455,15 +3474,15 @@ png=yes if test "$png" = yes -a "$zlib" = yes ; then echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 -echo "configure:3459: checking for png_get_valid in -lpng" >&5 +echo "configure:3478: checking for png_get_valid in -lpng" >&5 ac_lib_var=`echo png'_'png_get_valid | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lpng $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS -lz -lm $LIBS" +LIBS="-lpng $GFX_INC_PATH $GFXLFLAGS $XLFLAGS -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3498,20 +3517,20 @@ fi if test "$my_libok" = yes; then my_old_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $GFX_INC_PATH" + CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS" ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:3505: checking for png.h" >&5 +echo "configure:3524: checking for png.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3550,15 +3569,15 @@ fi if test "$jpeg" = yes; then echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 -echo "configure:3554: checking for jpeg_destroy_compress in -ljpeg" >&5 +echo "configure:3573: checking for jpeg_destroy_compress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ljpeg $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $LIBS" +LIBS="-ljpeg $GFX_INC_PATH $GFXLFLAGS $XLFLAGS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3593,14 +3612,14 @@ fi if test "$my_libok" = yes; then my_old_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $GFX_INC_PATH" + CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS" cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3630,15 +3649,15 @@ fi if test "$gif" = yes; then retry=no echo $ac_n "checking for DGifOpenFileName in -lungif""... $ac_c" 1>&6 -echo "configure:3634: checking for DGifOpenFileName in -lungif" >&5 +echo "configure:3653: checking for DGifOpenFileName in -lungif" >&5 ac_lib_var=`echo ungif'_'DGifOpenFileName | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lungif $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $LIBS" +LIBS="-lungif $GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3672,15 +3691,15 @@ fi if test "$retry" = yes; then echo $ac_n "checking for DGifOpenFileName in -lgif""... $ac_c" 1>&6 -echo "configure:3676: checking for DGifOpenFileName in -lgif" >&5 +echo "configure:3695: checking for DGifOpenFileName in -lgif" >&5 ac_lib_var=`echo gif'_'DGifOpenFileName | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgif $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $LIBS" +LIBS="-lgif $GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3716,20 +3735,20 @@ fi if test "$my_libok" = yes; then my_old_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $GFX_INC_PATH" + CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS" ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6 -echo "configure:3723: checking for gif_lib.h" >&5 +echo "configure:3742: checking for gif_lib.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3779,15 +3798,15 @@ ICONEXT="xpm" if test "$tif" = yes; then my_libname="" echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6 -echo "configure:3783: checking for TIFFGetVersion in -ltiff" >&5 +echo "configure:3802: checking for TIFFGetVersion in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ltiff $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $XLIBS $GFXLIBS -lm $LIBS" +LIBS="-ltiff $GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3822,15 +3841,15 @@ fi if test "$my_libok" = no; then if test "$zlib" = "yes"; then echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6 -echo "configure:3826: checking for TIFFGetVersion in -ltiff" >&5 +echo "configure:3845: checking for TIFFGetVersion in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ltiff $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $XLIBS $GFXLIBS -lz -lm $LIBS" +LIBS="-ltiff $GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3867,15 +3886,15 @@ fi if test "$my_libok" = no; then echo $ac_n "checking for TIFFGetVersion in -ltiff34""... $ac_c" 1>&6 -echo "configure:3871: checking for TIFFGetVersion in -ltiff34" >&5 +echo "configure:3890: checking for TIFFGetVersion in -ltiff34" >&5 ac_lib_var=`echo tiff34'_'TIFFGetVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ltiff34 $GFX_INC_PATH $GFX_LIB_PATH $XLFLAGS $XLIBS $GFXLIBS -lm $LIBS" +LIBS="-ltiff34 $GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3911,20 +3930,20 @@ fi if test "$my_libok" = yes; then my_old_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $GFX_INC_PATH" + CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS" ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:3918: checking for tiffio.h" >&5 +echo "configure:3937: checking for tiffio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3960,6 +3979,7 @@ fi + #LIBPL_LIBS="-L${top_builddir}/libPropList -lPropList" #LIBPL_INC_PATH="-I${top_srcdir}/libPropList" # @@ -4093,17 +4113,17 @@ if test "${with_appspath+set}" = set; then fi -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 @@ -4124,12 +4144,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4128: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4148: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4145,7 +4165,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4169,17 +4189,17 @@ for ac_hdr in fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h libintl.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4173: checking for $ac_hdr" >&5 +echo "configure:4193: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4209,12 +4229,12 @@ done echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:4213: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:4233: checking for sys_siglist declaration in signal.h or unistd.h" >&5 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4226,7 +4246,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:4230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -4247,12 +4267,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4251: checking for working const" >&5 +echo "configure:4271: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4322,12 +4342,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4326: checking for ANSI C header files" >&5 +echo "configure:4346: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4335,7 +4355,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4352,7 +4372,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4370,7 +4390,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4391,7 +4411,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4402,7 +4422,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4426,12 +4446,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4430: checking for size_t" >&5 +echo "configure:4450: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4459,12 +4479,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4463: checking for pid_t" >&5 +echo "configure:4483: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4492,12 +4512,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4496: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4516: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4506,7 +4526,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4576,7 +4596,7 @@ if test "$enable_shared" = yes; then fi echo $ac_n "checking for shared library support""... $ac_c" 1>&6 -echo "configure:4580: checking for shared library support" >&5 +echo "configure:4600: checking for shared library support" >&5 test=tmptest$$ cat > $test.c <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); + } +} diff --git a/src/actions.h b/src/actions.h index 80c4880f..7b4e9cb3 100644 --- a/src/actions.h +++ b/src/actions.h @@ -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 diff --git a/src/balloon.c b/src/balloon.c index 9c00764f..0d839d6b 100644 --- a/src/balloon.c +++ b/src/balloon.c @@ -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); diff --git a/src/client.c b/src/client.c index d49bfd66..41960461 100644 --- a/src/client.c +++ b/src/client.c @@ -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; } diff --git a/src/colormap.c b/src/colormap.c index 8d808ea9..b49b84b1 100644 --- a/src/colormap.c +++ b/src/colormap.c @@ -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); + } +} diff --git a/src/config.h b/src/config.h index 49d01204..abff05b2 100644 --- a/src/config.h +++ b/src/config.h @@ -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 diff --git a/src/defaults.c b/src/defaults.c index 12c41047..40669ead 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -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 */ }; diff --git a/src/dock.c b/src/dock.c index 6ac9cd43..50c0c2f7 100644 --- a/src/dock.c +++ b/src/dock.c @@ -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); diff --git a/src/event.c b/src/event.c index d1697d23..7ebfcd24 100644 --- a/src/event.c +++ b/src/event.c @@ -39,6 +39,9 @@ #include #endif +#ifdef KEEP_XKB_LOCK_STATUS +#include +#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 */ + } } diff --git a/src/funcs.h b/src/funcs.h index 6533a60a..416c72be 100644 --- a/src/funcs.h +++ b/src/funcs.h @@ -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, diff --git a/src/icon.c b/src/icon.c index 5cec2b28..264ed00b 100644 --- a/src/icon.c +++ b/src/icon.c @@ -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); } } diff --git a/src/keybind.h b/src/keybind.h index b3d125e1..b29ec6af 100644 --- a/src/keybind.h +++ b/src/keybind.h @@ -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 { diff --git a/src/main.c b/src/main.c index 098be86e..419ca1f1 100644 --- a/src/main.c +++ b/src/main.c @@ -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; diff --git a/src/menu.c b/src/menu.c index 69e22151..c1474ebd 100644 --- a/src/menu.c +++ b/src/menu.c @@ -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) { diff --git a/src/misc.c b/src/misc.c index 03158bba..60b2178e 100644 --- a/src/misc.c +++ b/src/misc.c @@ -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; iflags.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) { diff --git a/src/placement.c b/src/placement.c index c6d3c8ee..c667d868 100644 --- a/src/placement.c +++ b/src/placement.c @@ -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; } diff --git a/src/properties.c b/src/properties.c index 42fa2d63..57fb7cfe 100644 --- a/src/properties.c +++ b/src/properties.c @@ -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, diff --git a/src/screen.c b/src/screen.c index 098dfdd6..3b20a614 100644 --- a/src/screen.c +++ b/src/screen.c @@ -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); diff --git a/src/screen.h b/src/screen.h index 1d896f21..92b3d86e 100644 --- a/src/screen.h +++ b/src/screen.h @@ -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; diff --git a/src/startup.c b/src/startup.c index fd0280d2..7daac0a2 100644 --- a/src/startup.c +++ b/src/startup.c @@ -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); diff --git a/src/switchmenu.c b/src/switchmenu.c index 03e65eaf..ba13b3d9 100644 --- a/src/switchmenu.c +++ b/src/switchmenu.c @@ -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; diff --git a/src/wconfig.h b/src/wconfig.h index c19adb50..f8d15d1d 100644 --- a/src/wconfig.h +++ b/src/wconfig.h @@ -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 # define _(text) gettext(text) diff --git a/src/wconfig.h.in b/src/wconfig.h.in index e07317ea..20cafffb 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -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 # define _(text) gettext(text) diff --git a/src/window.c b/src/window.c index aa933a66..863274a6 100644 --- a/src/window.c +++ b/src/window.c @@ -27,10 +27,14 @@ #ifdef SHAPE #include #endif +#ifdef KEEP_XKB_LOCK_STATUS +# include +#endif /* KEEP_XKB_LOCK_STATUS */ #include #include #include + #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); diff --git a/src/window.h b/src/window.h index 4ae86b1b..2cb55ee0 100644 --- a/src/window.h +++ b/src/window.h @@ -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 */ diff --git a/src/winmenu.c b/src/winmenu.c index 7d5d16e2..cb825665 100644 --- a/src/winmenu.c +++ b/src/winmenu.c @@ -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; ientry_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) { diff --git a/test/Makefile.in b/test/Makefile.in index 85c28fb5..043fad24 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/util/Makefile.am b/util/Makefile.am index 668f686a..d8a6c5a6 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -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 diff --git a/util/Makefile.in b/util/Makefile.in index 04211933..2d6e110d 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -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 diff --git a/wmlib/Makefile.in b/wmlib/Makefile.in index 639ce0e1..a4ef16ae 100644 --- a/wmlib/Makefile.in +++ b/wmlib/Makefile.in @@ -63,6 +63,7 @@ CC = @CC@ CPP_PATH = @CPP_PATH@ DFLAGS = @DFLAGS@ GFXFLAGS = @GFXFLAGS@ +GFXLFLAGS = @GFXLFLAGS@ GFXLIBS = @GFXLIBS@ I18N = @I18N@ I18N_MB = @I18N_MB@ diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am index 6ff0be3e..1c57cbc5 100644 --- a/wrlib/Makefile.am +++ b/wrlib/Makefile.am @@ -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@ diff --git a/wrlib/Makefile.in b/wrlib/Makefile.in index 63de6b6c..62789c23 100644 --- a/wrlib/Makefile.in +++ b/wrlib/Makefile.in @@ -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 diff --git a/wrlib/context.c b/wrlib/context.c index 3c3c983f..a0fa3bb8 100644 --- a/wrlib/context.c +++ b/wrlib/context.c @@ -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 diff --git a/wrlib/convert.c b/wrlib/convert.c index 29029d30..cf9766b8 100644 --- a/wrlib/convert.c +++ b/wrlib/convert.c @@ -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 diff --git a/wrlib/testgrad.c b/wrlib/testgrad.c index c3ab7e30..9ebd2aa8 100644 --- a/wrlib/testgrad.c +++ b/wrlib/testgrad.c @@ -203,6 +203,5 @@ void main(int argc, char **argv) XFlush(dpy); #endif - getchar(); } diff --git a/wrlib/wraster.h b/wrlib/wraster.h index 252284b9..9ed3a461 100644 --- a/wrlib/wraster.h +++ b/wrlib/wraster.h @@ -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; diff --git a/wrlib/xutil.c b/wrlib/xutil.c index 8cc31a3f..22befc19 100644 --- a/wrlib/xutil.c +++ b/wrlib/xutil.c @@ -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 */ +