diff options
author | hobbs <hobbs> | 1999-09-22 06:53:07 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 1999-09-22 06:53:07 (GMT) |
commit | 34e1f07231357ed71ef318a9d7c0bd880432f529 (patch) | |
tree | 70b025d7d49df577a1cdea2a30d1bca75f4e6260 | |
parent | c87e8a004b0f429eae82f59f102168a67926445d (diff) | |
download | tk-34e1f07231357ed71ef318a9d7c0bd880432f529.zip tk-34e1f07231357ed71ef318a9d7c0bd880432f529.tar.gz tk-34e1f07231357ed71ef318a9d7c0bd880432f529.tar.bz2 |
1999-09-21 Jeff Hobbs <hobbs@scriptics.com>
* generic/tkFont.c: fixed processing of font options and error
returned [Bug: 2075]
* win/tkWinWm.c: fixed bug in 'wm deiconify' that raised the
wrong toplevel, and changed it to not set focus on overridden
toplevels
* unix/aclocal.m4: added fix for FreeBSD-[1-2] recognition [Bug: 2070]
and fix to AIX-* to get ldAix right [Bug: 2624], fixed AIX
version check and several other config fixes for AIX
* mac/tkMacMenubutton.c:
* unix/tkUnixMenubu.c: fixed permanently stippled menubutton image
* win/tkWinButton.c: fixed possible pointer smash [Bug: 2733]
* win/tkWinMenu.c: fix for stack overrun in GetTextFace [Bug: 909]
* unix/tkUnixDraw.c: fixed header style for TkpDrawHighlightBorder
* generic/tkCanvas.c: fixed GC error (bg <> fg) in tkCanvas.c
(from code added to support TkpDrawHighlightBorder) [Bug: 2676]
-rw-r--r-- | ChangeLog | 36 | ||||
-rw-r--r-- | generic/tkCanvas.c | 17 | ||||
-rw-r--r-- | generic/tkCursor.c | 5 | ||||
-rw-r--r-- | generic/tkFont.c | 4 | ||||
-rw-r--r-- | mac/tkMacMenubutton.c | 6 | ||||
-rw-r--r-- | unix/Makefile.in | 11 | ||||
-rw-r--r-- | unix/aclocal.m4 | 12 | ||||
-rw-r--r-- | unix/tkUnixDraw.c | 16 | ||||
-rw-r--r-- | unix/tkUnixMenubu.c | 6 | ||||
-rw-r--r-- | win/tkWinButton.c | 10 | ||||
-rw-r--r-- | win/tkWinMenu.c | 4 | ||||
-rw-r--r-- | win/tkWinWm.c | 11 |
12 files changed, 90 insertions, 48 deletions
@@ -1,11 +1,35 @@ +1999-09-21 Jeff Hobbs <hobbs@scriptics.com> + + * generic/tkFont.c: fixed processing of font options and error + returned [Bug: 2075] + + * win/tkWinWm.c: fixed bug in 'wm deiconify' that raised the + wrong toplevel, and changed it to not set focus on overridden + toplevels + + * unix/aclocal.m4: added fix for FreeBSD-[1-2] recognition [Bug: 2070] + and fix to AIX-* to get ldAix right [Bug: 2624], fixed AIX + version check and several other config fixes for AIX + + * mac/tkMacMenubutton.c: + * unix/tkUnixMenubu.c: fixed permanently stippled menubutton image + * win/tkWinButton.c: fixed possible pointer smash [Bug: 2733] + + * win/tkWinMenu.c: fix for stack overrun in GetTextFace [Bug: 909] + + * unix/tkUnixDraw.c: fixed header style for TkpDrawHighlightBorder + + * generic/tkCanvas.c: fixed GC error (bg <> fg) in tkCanvas.c + (from code added to support TkpDrawHighlightBorder) [Bug: 2676] + 1999-08-13 Jim Ingham <jingham@cygnus.com> - * mac/tkMacMenu.c: Tk_DrawChars ends up setting the menu background - wrong. There is no clean way to stop it, so I use lower level routines - here to draw the text. - * mac/tkMacProjects.sea.hqx: Rearrange the projects so that the build - directory is separate from the sources. Much more convenient! - + * mac/tkMacMenu.c: Tk_DrawChars ends up setting the menu background + wrong. There is no clean way to stop it, so I use lower level routines + here to draw the text. + * mac/tkMacProjects.sea.hqx: Rearrange the projects so that the build + directory is separate from the sources. Much more convenient! + 1999-08-10 Jeff Hobbs <hobbs@scriptics.com> * win/tkWinWm.c: changed "wm deiconify" on Windows to raise and diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index a184769..2d4fc31 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvas.c,v 1.7 1999/08/10 05:05:20 jingham Exp $ + * RCS: @(#) $Id: tkCanvas.c,v 1.7.4.1 1999/09/22 06:53:10 hobbs Exp $ */ #include "default.h" @@ -1840,18 +1840,17 @@ DisplayCanvas(clientData) } if (canvasPtr->highlightWidth != 0) { GC fgGC, bgGC; - - - bgGC = Tk_GCForColor(canvasPtr->highlightColorPtr, + + bgGC = Tk_GCForColor(canvasPtr->highlightBgColorPtr, Tk_WindowId(tkwin)); if (canvasPtr->textInfo.gotFocus) { - fgGC = Tk_GCForColor(canvasPtr->highlightBgColorPtr, + fgGC = Tk_GCForColor(canvasPtr->highlightColorPtr, Tk_WindowId(tkwin)); - TkpDrawHighlightBorder(tkwin, fgGC, bgGC, canvasPtr->highlightWidth, - Tk_WindowId(tkwin)); + TkpDrawHighlightBorder(tkwin, fgGC, bgGC, + canvasPtr->highlightWidth, Tk_WindowId(tkwin)); } else { - TkpDrawHighlightBorder(tkwin, bgGC, bgGC, canvasPtr->highlightWidth, - Tk_WindowId(tkwin)); + TkpDrawHighlightBorder(tkwin, bgGC, bgGC, + canvasPtr->highlightWidth, Tk_WindowId(tkwin)); } } } diff --git a/generic/tkCursor.c b/generic/tkCursor.c index 87b284d..adcf43e 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCursor.c,v 1.3 1999/04/16 01:51:13 stanton Exp $ + * RCS: @(#) $Id: tkCursor.c,v 1.3.6.1 1999/09/22 06:53:11 hobbs Exp $ */ #include "tkPort.h" @@ -658,6 +658,7 @@ Tk_GetCursorFromObj(tkwin, objPtr) Tcl_Obj *objPtr; /* The object from which to get pixels. */ { TkCursor *cursorPtr = GetCursorFromObj(tkwin, objPtr); + /* GetCursorFromObj should never return NULL */ return cursorPtr->cursor; } @@ -716,7 +717,7 @@ GetCursorFromObj(tkwin, objPtr) for (cursorPtr = (TkCursor *) Tcl_GetHashValue(hashPtr); cursorPtr != NULL; cursorPtr = cursorPtr->nextPtr) { - if (Tk_Display(tkwin) != cursorPtr->display) { + if (Tk_Display(tkwin) == cursorPtr->display) { objPtr->internalRep.twoPtrValue.ptr1 = (VOID *) cursorPtr; cursorPtr->objRefCount++; return cursorPtr; diff --git a/generic/tkFont.c b/generic/tkFont.c index a59c1b7..988dc6f 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFont.c,v 1.5 1999/06/02 18:15:54 stanton Exp $ + * RCS: @(#) $Id: tkFont.c,v 1.5.4.1 1999/09/22 06:53:11 hobbs Exp $ */ #include "tkPort.h" @@ -2837,7 +2837,7 @@ ConfigAttributesObj(interp, tkwin, objc, objv, faPtr) &index) != TCL_OK) { return TCL_ERROR; } - if (objc & 1) { + if ((i+2 >= objc) && (objc & 1)) { /* * This test occurs after Tcl_GetIndexFromObj() so that * "font create xyz -xyz" will return the error message diff --git a/mac/tkMacMenubutton.c b/mac/tkMacMenubutton.c index 698ac97..c928864 100644 --- a/mac/tkMacMenubutton.c +++ b/mac/tkMacMenubutton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacMenubutton.c,v 1.5 1999/08/10 05:05:02 jingham Exp $ + * RCS: @(#) $Id: tkMacMenubutton.c,v 1.5.4.1 1999/09/22 06:53:14 hobbs Exp $ */ #include "tkMenubutton.h" @@ -163,8 +163,8 @@ TkpDisplayMenuButton( * foreground color, generate the stippled effect. */ - if ((mbPtr->state == STATE_DISABLED && mbPtr->disabledFg != NULL) - || (mbPtr->image != NULL)) { + if ((mbPtr->state == STATE_DISABLED) + && ((mbPtr->disabledFg != NULL) || (mbPtr->image != NULL))) { XFillRectangle(mbPtr->display, Tk_WindowId(tkwin), mbPtr->disabledGC, mbPtr->inset, mbPtr->inset, (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset), diff --git a/unix/Makefile.in b/unix/Makefile.in index 27cc9bb..24bf43e 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.29 1999/08/04 23:42:15 wart Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.29.4.1 1999/09/22 06:53:17 hobbs Exp $ # Current Tk version; used in various names. @@ -197,6 +197,7 @@ WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc # The values of the symbolis normally set by the configure script. SHLIB_LD = @SHLIB_LD@ +SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ # Additional search flags needed to find the various shared libraries # at run-time. The first symbol is for use when creating a binary @@ -349,7 +350,11 @@ binaries: ${TK_LIB_FILE} ${STUB_LIB_FILE} wish libraries: -doc: +$(SRC_DIR)/doc/man.macros: + chmod +x $(UNIX_DIR)/install-sh + $(INSTALL_DATA) @TCL_SRC_DIR@/doc/man.macros $(SRC_DIR)/doc/man.macros + +doc: $(SRC_DIR)/doc/man.macros # The following target is configured by autoconf to generate either # a shared library or non-shared library for Tk. @@ -396,6 +401,7 @@ xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE) test: tktest LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; \ export LD_LIBRARY_PATH; \ + LIBPATH=`pwd`:${TCL_BIN_DIR}:${LIBPATH}; export LIBPATH; \ SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}; \ export SHLIB_PATH; \ TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \ @@ -406,6 +412,7 @@ test: tktest runtest: LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; \ export LD_LIBRARY_PATH; \ + LIBPATH=`pwd`:${TCL_BIN_DIR}:${LIBPATH}; export LIBPATH; \ SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}; \ export SHLIB_PATH; \ TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \ diff --git a/unix/aclocal.m4 b/unix/aclocal.m4 index eb24967..11412ee 100644 --- a/unix/aclocal.m4 +++ b/unix/aclocal.m4 @@ -565,11 +565,11 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ case $system in AIX-4.[[2-9]]) SHLIB_CFLAGS="" - SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" + SHLIB_LD=$TCL_SHLIB_LD SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" + DL_LIBS="-ldl ${TCL_BUILD_LIB_SPEC}" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' TCL_NEEDS_EXP_FILE=1 @@ -577,12 +577,12 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ ;; AIX-*) SHLIB_CFLAGS="" - SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512" + SHLIB_LD=$TCL_SHLIB_LD SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LIBOBJS="$LIBOBJS tclLoadAix.o" - DL_LIBS="-lld" + DL_LIBS="-lld ${TCL_BUILD_LIB_SPEC}" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' TCL_NEEDS_EXP_FILE=1 @@ -645,7 +645,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ IRIX-5.*|IRIX-6.*|IRIX64-6.5*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" - SHLIB_LD_LIBS="" + SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" @@ -725,7 +725,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ LDFLAGS="-Wl,-Bexport" LD_SEARCH_FLAGS="" ;; - NetBSD-*|FreeBSD-[[12]].*|OpenBSD-*) + NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ SHLIB_CFLAGS="-fpic" diff --git a/unix/tkUnixDraw.c b/unix/tkUnixDraw.c index d7ac932..2d720f2 100644 --- a/unix/tkUnixDraw.c +++ b/unix/tkUnixDraw.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixDraw.c,v 1.4 1999/08/10 05:04:45 jingham Exp $ + * RCS: @(#) $Id: tkUnixDraw.c,v 1.4.4.1 1999/09/22 06:53:18 hobbs Exp $ */ #include "tkPort.h" @@ -196,13 +196,13 @@ ScrollRestrictProc(arg, eventPtr) */ void -TkpDrawHighlightBorder ( - Tk_Window tkwin, - GC fgGC, - GC bgGC, - int highlightWidth, - Drawable drawable) +TkpDrawHighlightBorder(tkwin, fgGC, bgGC, highlightWidth, drawable) + Tk_Window tkwin; + GC fgGC; + GC bgGC; + int highlightWidth; + Drawable drawable; { - TkDrawInsetFocusHighlight (tkwin, fgGC, highlightWidth, drawable, 0); + TkDrawInsetFocusHighlight(tkwin, fgGC, highlightWidth, drawable, 0); } diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c index d8cba87..09b6764 100644 --- a/unix/tkUnixMenubu.c +++ b/unix/tkUnixMenubu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixMenubu.c,v 1.3 1999/04/16 01:51:47 stanton Exp $ + * RCS: @(#) $Id: tkUnixMenubu.c,v 1.3.6.1 1999/09/22 06:53:18 hobbs Exp $ */ #include "tkMenubutton.h" @@ -143,8 +143,8 @@ TkpDisplayMenuButton(clientData) * foreground color, generate the stippled effect. */ - if (((mbPtr->state == STATE_DISABLED) - && (mbPtr->disabledFg == NULL)) || (mbPtr->image != NULL)) { + if ((mbPtr->state == STATE_DISABLED) + && ((mbPtr->disabledFg == NULL) || (mbPtr->image != NULL))) { XFillRectangle(mbPtr->display, pixmap, mbPtr->disabledGC, mbPtr->inset, mbPtr->inset, (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset), diff --git a/win/tkWinButton.c b/win/tkWinButton.c index 6f2602c..2d8e0bc 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinButton.c,v 1.5 1999/04/21 21:53:32 rjohnson Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.5.6.1 1999/09/22 06:53:24 hobbs Exp $ */ #define OEMRESOURCE @@ -789,6 +789,14 @@ ButtonProc(hwnd, message, wParam, lParam) BeginPaint(hwnd, &ps); EndPaint(hwnd, &ps); TkpDisplayButton((ClientData)butPtr); + + /* + * Special note: must cancel any existing idle handler + * for TkpDisplayButton; it's no longer needed, and + * TkpDisplayButton cleared the REDRAW_PENDING flag. + */ + + Tcl_CancelIdleCall(TkpDisplayButton, (ClientData)butPtr); return 0; } case BN_CLICKED: { diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index b39d584..4b1a1b5 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinMenu.c,v 1.5 1999/04/16 01:51:52 stanton Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.5.6.1 1999/09/22 06:53:24 hobbs Exp $ */ #define OEMRESOURCE @@ -2716,7 +2716,7 @@ SetDefaults( } SelectObject(scratchDC, menuFont); GetTextMetrics(scratchDC, &tm); - GetTextFace(scratchDC, sizeof(menuFontDString), faceName); + GetTextFace(scratchDC, LF_FACESIZE, faceName); pointSize = MulDiv(tm.tmHeight - tm.tmInternalLeading, 72, GetDeviceCaps(scratchDC, LOGPIXELSY)); if (tm.tmWeight >= 700) { diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 822735e..a689649 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.10 1999/08/10 16:58:52 hobbs Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.10.4.1 1999/09/22 06:53:25 hobbs Exp $ */ #include "tkWinInt.h" @@ -1392,10 +1392,13 @@ Tk_WmCmd(clientData, interp, argc, argv) TkpWmSetState(winPtr, NormalState); /* * Follow Windows-like style here: - * raise the window to the top and force the focus on it + * raise the window to the top, and if it isn't overridden, + * then force the focus on it */ - Tk_RestackWindow(tkwin, Above, NULL); - TkSetFocusWin(winPtr, 1); + TkWmRestackToplevel(winPtr, Above, NULL); + if (!(Tk_Attributes((Tk_Window) winPtr)->override_redirect)) { + TkSetFocusWin(winPtr, 1); + } } else if ((c == 'f') && (strncmp(argv[1], "focusmodel", length) == 0) && (length >= 2)) { if ((argc != 3) && (argc != 4)) { |