From abde3e0c4efbe98e2ef2b812a5b1f97ec4ffe10d Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 23 Oct 1998 17:07:08 +0000 Subject: [PATCH] Small bug fixes over 0.20.2 -Dan --- ChangeLog | 10 +++---- INSTALL | 7 ++++- NEWS | 11 +++++++- WPrefs.app/Menu.c | 6 +++-- configure | 81 ++++++++++++++++++++++++++++--------------------------- configure.in | 26 ++++++++++-------- mkpatch | 2 +- src/funcs.h | 3 ++- src/placement.c | 32 +++++++++++++--------- src/window.c | 4 +-- util/wxcopy.c | 1 + util/wxpaste.c | 1 + wrlib/nxpm.c | 5 ++-- 13 files changed, 111 insertions(+), 78 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45241911..62411bbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,7 @@ Changes since version 0.20.1: - fixed timer bug - removed NoWindowUnderDock - error reporting mechanism has changed in wrlib. Instead of a writing -the message in a string, it will place the error code in RErrorCode + the message in a string, it will place the error code in RErrorCode - smoother icon selection - persistent client supplied icon pixmaps - fixed yet another crash on emacs exit bug @@ -19,7 +19,7 @@ the message in a string, it will place the error code in RErrorCode - fixed bug in libproplist - fixed focus with sloppy - changed permissions of shm segments to 0666. Now, if someone has a shm -leak, we can know who it is. + leak, we can know who it is. - faster titlebar texture update - faster icon kaboom - added different undocking animation @@ -35,7 +35,7 @@ leak, we can know who it is. - selection retrieval moved to WINGs - fixed workspacekey to switch workspaces in the current layer - fixed workspacekey to not switch to inexisting workspace unless -AdvanceToNewWorkspace is YES + AdvanceToNewWorkspace is YES - fixed bug with disappearing windows if a workspace switch is made on startup - fixed blocking of window creation/destroy events when opening menu with kbd - fixed aspect ratio setting bug @@ -45,11 +45,11 @@ AdvanceToNewWorkspace is YES - raised threshold for removing docked icons - fixed HideOthers for windows with NoAppIcon=YES - if Cancel is pressed in dialog box of %a in menu cmd lines, the command -will be canceled + will be canceled - slightly better dithering for 8bpp - apps menu will use $SHELL, instead of /bin/sh to run EXEC menu commands - cleaned up some code (GetNormalHints(), wManageWindow(), -wGetWindowSavedState() et al, ) + wGetWindowSavedState() et al, ) Changes since version 0.20.0: diff --git a/INSTALL b/INSTALL index b5d78915..12d2bf84 100644 --- a/INSTALL +++ b/INSTALL @@ -158,7 +158,12 @@ PLATFORM SPECIFIC NOTES: - Debian Linux If you want JPEG and TIFF support, make sure you have libtiff-dev and libjpeg-dev installed. - + +- SuSE Linux + If you installed the Window Maker package from SuSE, + uninstall it before trying to compile wmaker or you + might have problems. + - MetroX (unknown version) MetroX has a bug that corrupts pixmaps that are set as window backgrounds. If you use MetroX and has weird problems with diff --git a/NEWS b/NEWS index df8dadee..d12fc4c7 100644 --- a/NEWS +++ b/NEWS @@ -80,7 +80,7 @@ If you want the animation, enable AutoFocus or use manual focus mode The NoWindowUnderDock option was removed ---------------------------------------- -To obtain the same result, use the "Floating Dock" option in the dock menu. +To obtain the same result, use the "Keep Dock On Top" option in the dock menu. Persistent Program Suplied Icons @@ -91,6 +91,15 @@ showing them after the app is exited. The icons are stored at ~/GNUstep/.AppInfo/WindowMaker/ +Sound support +------------- + +Sound support is now on by default. Even if you don't use sound the overhead +is very small, and has no impact on performance. If you still want to +optimize it and remove a few hundred of bytes, then use --disable-sound or +--enable-sound=no options when you configure Window Maker. + + --- 0.20.0 diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c index 21eeef92..bfb02412 100644 --- a/WPrefs.app/Menu.c +++ b/WPrefs.app/Menu.c @@ -1268,7 +1268,7 @@ showData(_Panel *panel) { char *gspath; char *menuPath; - proplist_t menu, pmenu; + proplist_t menu, pmenu, plPath; char buffer[512]; int hasWSMenu=0; @@ -1302,8 +1302,10 @@ showData(_Panel *panel) } else { pmenu = preProcessMenu(menu, &hasWSMenu); } - PLSetFilename(pmenu, menuPath); + plPath = PLMakeString(menuPath); free(menuPath); + PLSetFilename(pmenu, plPath); + PLRelease(plPath); if (menu) PLRelease(menu); diff --git a/configure b/configure index e09b2f0b..37e61fbb 100755 --- a/configure +++ b/configure @@ -20,7 +20,7 @@ ac_help="$ac_help ac_help="$ac_help --disable-shape disable shaped window extension support" ac_help="$ac_help - --disable-shm disable usage of MIT-SHM extension" + --disable-shm disable usage of MIT-SHM extension" ac_help="$ac_help --with-gfx-libs pass compiler flags to look for gfx libraries" ac_help="$ac_help @@ -30,17 +30,17 @@ ac_help="$ac_help ac_help="$ac_help --disable-jpeg disable JPEG support through libjpeg" ac_help="$ac_help - --disable-gif disable GIF support through libgif or libungif" + --disable-gif disable GIF support through libgif or libungif" ac_help="$ac_help --disable-tiff disable use of TIFF images through libtiff" ac_help="$ac_help --enable-debug enable debugging " ac_help="$ac_help - --enable-sound enable sound support " + --disable-sound disable sound support " ac_help="$ac_help --with-pixmapdir=PATH specify where pixmaps are located [DATADIR/pixmaps]" ac_help="$ac_help - --with-appspath=PATH specify the path of the GNUstep applications directory " + --with-appspath=PATH specify the path of the GNUstep applications directory" ac_help="$ac_help --enable-single-icon use single application icon per WM_INSTANCE+WM_CLASS " @@ -4041,15 +4041,16 @@ fi +sound=yes # Check whether --enable-sound or --disable-sound was given. if test "${enable_sound+set}" = set; then enableval="$enable_sound" - : + sound=$enableval else - enable_sound=no + sound=yes fi -if test "$enable_sound" = yes; then +if test "$sound" = yes; then SOUND="#define WMSOUND" else SOUND="#undef WMSOUND" @@ -4123,12 +4124,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4127: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4128: 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 @@ -4144,7 +4145,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4168,17 +4169,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:4172: checking for $ac_hdr" >&5 +echo "configure:4173: 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:4182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4208,12 +4209,12 @@ done echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:4212: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:4213: 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 @@ -4225,7 +4226,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -4246,12 +4247,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4250: checking for working const" >&5 +echo "configure:4251: 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:4305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4321,12 +4322,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4325: checking for ANSI C header files" >&5 +echo "configure:4326: 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 @@ -4334,7 +4335,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4351,7 +4352,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 @@ -4369,7 +4370,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 @@ -4390,7 +4391,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4401,7 +4402,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4425,12 +4426,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4429: checking for size_t" >&5 +echo "configure:4430: 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 @@ -4458,12 +4459,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4462: checking for pid_t" >&5 +echo "configure:4463: 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 @@ -4491,12 +4492,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4495: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4496: 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 @@ -4505,7 +4506,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4575,7 +4576,7 @@ if test "$enable_shared" = yes; then fi echo $ac_n "checking for shared library support""... $ac_c" 1>&6 -echo "configure:4579: checking for shared library support" >&5 +echo "configure:4580: checking for shared library support" >&5 test=tmptest$$ cat > $test.c <> $TMP/delfiles - if [ -d $OTREE/$delfiles ]; then + if [ -d $OTREE/$i ]; then echo "rm -rf ../$i" >> $TMP/delfiles else echo "rm ../$i" >> $TMP/delfiles diff --git a/src/funcs.h b/src/funcs.h index 3d220243..6533a60a 100644 --- a/src/funcs.h +++ b/src/funcs.h @@ -75,7 +75,8 @@ Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height); void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret); -void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret); +void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, + unsigned int width, unsigned int height); #ifdef USECPP char *MakeCPPArgs(char *path); diff --git a/src/placement.c b/src/placement.c index 78deb491..c6d3c8ee 100644 --- a/src/placement.c +++ b/src/placement.c @@ -314,10 +314,10 @@ PlaceIcon(WScreen *scr, int *x_ret, int *y_ret) static int -smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret) +smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, + unsigned int width, unsigned int height) { WScreen *scr = wwin->screen_ptr; - int height,width; int test_x = 0, test_y = Y_ORIGIN; int loc_ok = False, tw,tx,ty,th; int swidth, sx; @@ -337,11 +337,11 @@ smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret) else if (X_ORIGIN < wPreferences.icon_size + DOCK_EXTRA_SPACE) sx += wPreferences.icon_size + DOCK_EXTRA_SPACE - X_ORIGIN; } - - /* this was based on fvwm2's smart placement */ - height = wwin->client.height+extra_height; - width = wwin->client.width; + /* this was based on fvwm2's smart placement */ + + height += extra_height; + while (((test_y + height) < (scr->scr_height)) && (!loc_ok)) { test_x = sx; @@ -409,10 +409,16 @@ 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, int h) +cascadeWindow(WScreen *scr, WWindow *wwin, int *x_ret, int *y_ret, + unsigned int width, unsigned int height, int h) { - unsigned int extra_height, height, width; + unsigned int extra_height; if (wwin->frame) extra_height = wwin->frame->top_width + wwin->frame->bottom_width; @@ -421,8 +427,7 @@ cascadeWindow(WScreen *scr, WWindow *wwin, int *x_ret, int *y_ret, int h) *x_ret = h * scr->cascade_index + X_ORIGIN; *y_ret = h * scr->cascade_index + Y_ORIGIN; - height = wwin->client.height + extra_height; - width = wwin->client.width; + height += extra_height; if (width + *x_ret > scr->scr_width || height + *y_ret > scr->scr_height) { scr->cascade_index = 0; @@ -433,7 +438,8 @@ cascadeWindow(WScreen *scr, WWindow *wwin, int *x_ret, int *y_ret, int h) void -PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret) +PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, + unsigned width, unsigned height) { WScreen *scr = wwin->screen_ptr; int h = scr->title_font->height+TITLEBAR_EXTRA_HEIGHT; @@ -444,7 +450,7 @@ PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret) break; case WPM_SMART: - if (smartPlaceWindow(wwin, x_ret, y_ret)) + if (smartPlaceWindow(wwin, x_ret, y_ret, width, height)) break; /* there isn't a break here, because if we fail, it should fall through to cascade placement, as people who want tiling want @@ -454,7 +460,7 @@ PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret) if (wPreferences.window_placement == WPM_SMART) scr->cascade_index++; - cascadeWindow(scr, wwin, x_ret, y_ret, h); + cascadeWindow(scr, wwin, x_ret, y_ret, width, height, h); if (wPreferences.window_placement == WPM_CASCADE) scr->cascade_index++; diff --git a/src/window.c b/src/window.c index 4d61610c..aa933a66 100644 --- a/src/window.c +++ b/src/window.c @@ -770,7 +770,7 @@ wManageWindow(WScreen *scr, Window window) } else if (wwin->transient_for==None && !scr->flags.startup && workspace==scr->current_workspace && !iconic && !(wwin->normal_hints->flags & (USPosition|PPosition))) { - PlaceWindow(wwin, &x, &y); + PlaceWindow(wwin, &x, &y, width, height); } if (wwin->window_flags.dont_move_off) @@ -839,7 +839,7 @@ wManageWindow(WScreen *scr, Window window) int gx, gy; wClientGetGravityOffsets(wwin, &gx, &gy); - /* set the positio of the frame on screen */ + /* set the position of the frame on screen */ x += gx * FRAME_BORDER_WIDTH; y += gy * FRAME_BORDER_WIDTH; /* if gravity is to the south, account for the border sizes */ diff --git a/util/wxcopy.c b/util/wxcopy.c index ce43a1be..8e95cd46 100644 --- a/util/wxcopy.c +++ b/util/wxcopy.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/util/wxpaste.c b/util/wxpaste.c index d66bfbe1..516d0e7f 100644 --- a/util/wxpaste.c +++ b/util/wxpaste.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/wrlib/nxpm.c b/wrlib/nxpm.c index cae055c4..33796456 100644 --- a/wrlib/nxpm.c +++ b/wrlib/nxpm.c @@ -43,6 +43,7 @@ char *alloca (); #include #include #include +#include #include "wraster.h" @@ -101,7 +102,7 @@ RGetImageFromXPMData(RContext *context, char **data) if (!color_table[0] || !color_table[1] || !color_table[2] || !color_table[3] || !symbol_table || !bsize) { - RErrorCode = RERR_MEMORY; + RErrorCode = RERR_NOMEMORY; alloca(0); return NULL; } @@ -270,7 +271,7 @@ RLoadXPM(RContext *context, char *file, int index) if (!color_table[0] || !color_table[1] || !color_table[2] || !color_table[3] || !symbol_table || !bsize) { - RErrorCode = RERR_MEMORY; + RErrorCode = RERR_NOMEMORY; fclose(f); alloca(0); return NULL; -- 2.11.4.GIT