From 58a16b7b3a68d726dd781d2a64812fd48af65bd0 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Jul 2012 14:09:08 +0000 Subject: Release candidate branch for Tk 8.5.12. --- README | 2 +- library/tk.tcl | 2 +- unix/configure | 14 +++++++------- unix/configure.in | 2 +- unix/tk.spec | 2 +- unix/tkConfig.h.in | 9 ++++++--- win/configure | 2 +- win/configure.in | 2 +- 8 files changed, 19 insertions(+), 16 deletions(-) diff --git a/README b/README index bc2a001..62d945b 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ README: Tk - This is the Tk 8.5.11 source distribution. + This is the Tk 8.5.12 source distribution. http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. diff --git a/library/tk.tcl b/library/tk.tcl index e583967..99ab97b 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -15,7 +15,7 @@ package require Tcl 8.5 ;# Guard against [source] in an 8.4- interp before # Insist on running with compatible version of Tcl package require Tcl 8.5.0 # Verify that we have Tk binary and script components from the same release -package require -exact Tk 8.5.11 +package require -exact Tk 8.5.12 # Create a ::tk namespace namespace eval ::tk { diff --git a/unix/configure b/unix/configure index 67e7cb3..93eceb5 100755 --- a/unix/configure +++ b/unix/configure @@ -1338,7 +1338,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TK_VERSION=8.5 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 -TK_PATCH_LEVEL=".11" +TK_PATCH_LEVEL=".12" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" @@ -10106,7 +10106,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Intrinsic.h. + # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10114,7 +10114,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -10141,7 +10141,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Intrinsic.h"; then + if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi @@ -10155,18 +10155,18 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lXt $LIBS" + LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XtMalloc (0) +XrmInitialize () ; return 0; } diff --git a/unix/configure.in b/unix/configure.in index a7bc887..059bb07 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -25,7 +25,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TK_VERSION=8.5 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 -TK_PATCH_LEVEL=".11" +TK_PATCH_LEVEL=".12" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" diff --git a/unix/tk.spec b/unix/tk.spec index 21a4b7d..df0e6b4 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -4,7 +4,7 @@ Name: tk Summary: Tk graphical toolkit for the Tcl scripting language. -Version: 8.5.11 +Version: 8.5.12 Release: 2 License: BSD Group: Development/Languages diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in index cfa8a32..8750b86 100644 --- a/unix/tkConfig.h.in +++ b/unix/tkConfig.h.in @@ -13,6 +13,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_AVAILABILITYMACROS_H +/* Defined when compiler supports casting to union type. */ +#undef HAVE_CAST_TO_UNION + /* Do we have access to Darwin CoreFoundation.framework? */ #undef HAVE_COREFOUNDATION @@ -109,6 +112,9 @@ /* Compiler support for module scope symbols */ #undef MODULE_SCOPE +/* Is no debugging enabled? */ +#undef NDEBUG + /* Is Darwin CoreFoundation unavailable for 64-bit? */ #undef NO_COREFOUNDATION_64 @@ -142,9 +148,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Is debugging enabled? */ -#undef TCL_CFG_DEBUG - /* Is this a 64-bit build? */ #undef TCL_CFG_DO64BIT diff --git a/win/configure b/win/configure index c1a1a23..dd4303a 100755 --- a/win/configure +++ b/win/configure @@ -1311,7 +1311,7 @@ SHELL=/bin/sh TK_VERSION=8.5 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 -TK_PATCH_LEVEL=".11" +TK_PATCH_LEVEL=".12" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/configure.in b/win/configure.in index 4154945..1d0ab37 100644 --- a/win/configure.in +++ b/win/configure.in @@ -14,7 +14,7 @@ SHELL=/bin/sh TK_VERSION=8.5 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 -TK_PATCH_LEVEL=".11" +TK_PATCH_LEVEL=".12" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ -- cgit v0.12 From 763538938fe9fcfcbb6fda499d06930f54c77c73 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Jul 2012 14:29:39 +0000 Subject: missed a spot --- generic/tk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tk.h b/generic/tk.h index af7b05c..5ebe71d 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -51,10 +51,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 5 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 11 +#define TK_RELEASE_SERIAL 12 #define TK_VERSION "8.5" -#define TK_PATCH_LEVEL "8.5.11" +#define TK_PATCH_LEVEL "8.5.12" /* * A special definition used to allow this header file to be included from -- cgit v0.12 From 78d66d5a3c3804ab79bdea5bd12ee198918da2f8 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 16 Jul 2012 19:36:54 +0000 Subject: Update changes for Tk 8.5.12 release. --- ChangeLog | 45 +++++++++++++++++++++++++++++---------------- changes | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef8f53e..c7ca123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -69,7 +69,8 @@ 2012-06-07 Jan Nijtmans * generic/tkInt.decls: Change XChangeWindowAttributes signature and - * generic/tkIntXlibDeclsDecls.h: many others to match Xorg, needed for Cygwin. + * generic/tkIntXlibDeclsDecls.h: many others to match Xorg, needed for + Cygwin. 2012-06-06 Jan Nijtmans @@ -86,22 +87,22 @@ 2012-05-30 Jan Nijtmans - * generic/tkWindow.c: Simpify determination whether we are running on cygwin. - * generic/tkStubInit.c: Export Tk_GetHINSTANCE, TkSetPixmapColormap and - * generic/tkInt.decls: TkpPrintWindowId on the Cygwin dll, sync stub table - with Tk 8.6 win32 version. + * generic/tkWindow.c: Simplify determination whether we are running + * generic/tkStubInit.c: on cygwin. Export Tk_GetHINSTANCE, + * generic/tkInt.decls: TkSetPixmapColormap and TkpPrintWindowId on the + Cygwin dll, sync stub table with Tk 8.6 win32 version. * generic/tk*Decls.h: re-generated - * win/Makefile.in: Fix "make genstubs" when cross-compiling on UNIX + * win/Makefile.in: "make genstubs" when cross-compiling on UNIX 2012-05-28 Francois Vogel - * doc/text.n: [Bug 1630251]: Documentation for -endline option was wrong + * doc/text.n: [Bug 1630251]: Doc for -endline option was wrong 2012-05-28 Francois Vogel - * generic/tkTextDisp.c: [Bug 1630254]: missing scrolling of text widget - when from a -startline == -endline initial state it is configured to display - a non-empty part of it + * generic/tkTextDisp.c: [Bug 1630254]: missing scrolling of text widget + when from a -startline == -endline initial state it is configured to + display a non-empty part of it 2012-05-24 Jan Nijtmans @@ -121,15 +122,16 @@ 2012-05-05 Jan Nijtmans * xlib/xcolors.c: Single "const" addition - * generic/tkWindow.c: If tk.dll loaded in cygwin, don't use the win32 file dialogs + * generic/tkWindow.c: If tk.dll loaded in cygwin, don't use the + win32 file dialogs 2012-05-04 Jan Nijtmans - * library/menu.tcl: [Bug 2768586]: Menu posting problem on dual monitors + * library/menu.tcl: [Bug 2768586]: Menu posting on dual monitors 2012-05-02 Jan Nijtmans - * library/tk.tcl: [Bug 533519]: Window placement with multiple screens + * library/tk.tcl: [Bug 533519]: Window placement with multiple screens * generic/tkBind.c: * generic/tkFocus.c: * generic/tkMenuDraw.c: @@ -142,12 +144,13 @@ 2012-04-26 Jan Nijtmans - * generic/tk.decls: [Bug 3508771]: Implement TkClipBox, Tk*Region and - * generic/tkInt.decls: Tk_GetHINSTANCE for Cygwin + * generic/tk.decls: [Bug 3508771]: Implement TkClipBox, Tk*Region + * generic/tkInt.decls: and Tk_GetHINSTANCE for Cygwin * generic/tkPlatDecls.h: * generic/tkintDecls.h: * generic/tkStubInit.c: - * unix/Makefile.in: [Bug 3519917]: Snow Leopard unix/Makefile `make test` fail + * unix/Makefile.in: [Bug 3519917]: Snow Leopard unix/Makefile + `make test` fail 2012-04-22 Donal K. Fellows @@ -238,6 +241,11 @@ Tkinter's handling of multiple filename results. Issue was reported via StackOverflow: http://stackoverflow.com/q/9227859/301832 +2012-01-30 Joe English + + * library/ttk/combobox.tcl: [Bug 2925561] Don't take focus in + disabled state. + 2012-01-29 Jan Nijtmans * win/tkImgPhoto.c: [Bug 3480634]: PNG Images missing in menus on Mac @@ -281,6 +289,11 @@ * generic/tkText.c: [Bug-3021557]: Moving the cursor in * tests/text.test: elided text freezes Tk +2011-12-22 Don Porter + + * win/tkWinMenu.c: [Bug 3235256] Keep menu entry IDs out of system + values. Thanks Colin McDonald. + 2011-11-22 Jan Nijtmans * doc/wish.1: Use the same shebang comment everywhere. diff --git a/changes b/changes index e3a96be..9f82083 100644 --- a/changes +++ b/changes @@ -6795,3 +6795,49 @@ and -to (porter) 2011-11-02 (performance)[3431491] improved "pixels" shimmer logic (fellows) --- Released 8.5.11, November 4, 2011 --- See ChangeLog for details --- + +2011-11-17 (bug fix)[3437816] return code of [canvas lower] (hirner,ferrieux) + +2011-12-22 (bug fix)[3235256] correct menu failure on Windows (mcdonald) + +2012-01-19 (bug fix)[3021557] cursor freeze in elided text (vogel) + +2012-01-22 (bug fix)[3476698] hang in [text mark prev/next] (vogel) + +2012-01-25 (bug fix)[3475627] Stop text-31.11 failure (vogel) + +2012-01-25 (bug fix)[1630271] hang/crash on mark before -startline (vogel) + +2012-01-26 (bug fix)[1754043,2321450] -blockcursor appearance (vogel) + +2012-01-27 (bug fix)[3480471] crash in [tk_getOpenFile] (nijtmans) + +2012-01-29 (bug fix)[3480634] PNG image in menus (nijtmans) + +2012-01-30 (bug fix)[2925561] disabled combobox don't take focus (english) + +2012-02-10 (bug fix) win dialog avoid shimmer that confuses Python (fellows) + +2012-02-15 (bug fix)[3486474] Correct color scaling (goth,nijtmans) + +2012-02-28 (bug fix)[1630262,1615425] [text] crash tags & -*line (vogel) + +2012-03-07 (bug fix)[3497848] consistent pixel rounding (fassel,fellows) + +2012-03-18 (enhancement)[3503317] XParseColor speedup (nijtmans) + +2012-04-07 (bug fix)[3176239] control-Mousewheel crash (couch,nijtmans) + +2012-04-22 (bug fix)[3520202] %k,%K,%N for Python (deily,fellows) + +2012-05-02 (bug fix)[533519] multiscreen window placement (nijtmans) + +2012-05-04 (bug fix)[2768586] multiscreen menu posting (nijtmans) + +2012-05-28 (bug fix)[1630254] text peer update on -startline reset (baker,vogel) + +2012-06-11 (bug fix)[3294450] ttk text element clipping (oehlmann,fellows) + +Many revisions to better support a Cygwin environment (nijtmans) + +--- Released 8.5.12, July 20, 2012 --- See ChangeLog for details --- -- cgit v0.12 From e636ee749274262a51f2635ee3eafcd236a9bb91 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 17 Jul 2012 13:10:41 +0000 Subject: [Bug 3544932]: Visual studio compiler check fails --- ChangeLog | 4 ++++ win/makefile.vc | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82e10b6..bb34f20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-07-17 Jan Nijtmans + + * win/makefile.vc: [Bug 3544932]: Visual studio compiler check fails + 2012-07-08 Jan Nijtmans * generic/tkIntXlibDecls.h: [Bug 3541305]: Xfree/Xsync... diff --git a/win/makefile.vc b/win/makefile.vc index 32dd4d5..482cf13 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,10 +12,9 @@ # Copyright (c) 2001-2002 David Gravereaux. #------------------------------------------------------------------------------ -# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) -# or with the MS Platform SDK (MSSDK). Visual Studio .NET 2003 and 2005 define -# VCINSTALLDIR instead. -!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(MSSDK) && !defined(VCINSTALLDIR) +# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or +# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir) +!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(VCINSTALLDIR) && !defined(MSSDK) && !defined(WINDOWSSDKDIR) MSG = ^ You need to run vcvars32.bat from Developer Studio or setenv.bat from the^ Platform SDK first to setup the environment. Jump to this line to read^ -- cgit v0.12 From 676fab8fd449abcc70079637c0547bf99e705e7d Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 17 Jul 2012 17:10:38 +0000 Subject: Release note tidiness --- ChangeLog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8b6b358..0d87283 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2012-07-17 Don Porter + + *** 8.5.12 TAGGED FOR RELEASE *** + + * generic/tk.h: Bump to 8.5.12 for release. + * library/tk.tcl: + * unix/configure.in: + * unix/tk.spec: + * win/configure.in: + * README: + + * unix/configure: autoconf-2.59 + * win/configure: + + * changes: Updated for 8.5.12 release. + 2012-07-17 Jan Nijtmans * win/makefile.vc: [Bug 3544932]: Visual studio compiler check fails -- cgit v0.12 From 39a9b9cf335812121ef3f8bc61702ccd2211dcc8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 18 Jul 2012 11:19:39 +0000 Subject: better formatting of "configure --help" --- win/tcl.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win/tcl.m4 b/win/tcl.m4 index 9320d89..2f2964b 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -211,7 +211,7 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [ AC_DEFUN([SC_ENABLE_SHARED], [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, - [ --enable-shared build and link with shared libraries [--enable-shared]], + [ --enable-shared build and link with shared libraries (default: on)], [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_shared+set}" = set; then @@ -250,7 +250,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [ AC_DEFUN([SC_ENABLE_THREADS], [ AC_MSG_CHECKING(for building with threads) - AC_ARG_ENABLE(threads, [ --enable-threads build with threads], + AC_ARG_ENABLE(threads, [ --enable-threads build with threads (default: off)], [tcl_ok=$enableval], [tcl_ok=no]) if test "$tcl_ok" = "yes"; then @@ -297,7 +297,7 @@ AC_DEFUN([SC_ENABLE_THREADS], [ AC_DEFUN([SC_ENABLE_SYMBOLS], [ AC_MSG_CHECKING([for build with symbols]) - AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) + AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols (default: off)], [tcl_ok=$enableval], [tcl_ok=no]) # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' @@ -1059,7 +1059,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [ #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_CFG_ENCODING], [ - AC_ARG_WITH(encoding, [ --with-encoding encoding for configuration values], with_tcencoding=${withval}) + AC_ARG_WITH(encoding, [ --with-encoding encoding for configuration values], with_tcencoding=${withval}) if test x"${with_tcencoding}" != x ; then AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}") -- cgit v0.12 From 15a136cf5c8d9f67733287cb7bad1e9b5adb1a26 Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 18 Jul 2012 18:38:42 +0000 Subject: [Bug 3545457]: Crash on packing a menubutton --- ChangeLog | 4 ++++ unix/tkUnixMenubu.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb34f20..77499c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-07-?? Francois Vogel + + * unix/tkUnixMenuBu.c: [Bug 3545457]: Crash on packing a menubutton + 2012-07-17 Jan Nijtmans * win/makefile.vc: [Bug 3544932]: Visual studio compiler check fails diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c index 35c7da8..785fb75 100644 --- a/unix/tkUnixMenubu.c +++ b/unix/tkUnixMenubu.c @@ -74,10 +74,12 @@ TkpDisplayMenuButton(clientData) * compiler warning. */ int y = 0; register Tk_Window tkwin = mbPtr->tkwin; - int width, height, fullWidth, fullHeight; + int fullWidth, fullHeight; int textXOffset, textYOffset; int imageWidth, imageHeight; - int imageXOffset, imageYOffset; /* image information that will be used to + int imageXOffset, imageYOffset; + int width = 0, height = 0; + /* image information that will be used to * restrict disabled pixmap as well */ int haveImage = 0, haveText = 0; -- cgit v0.12 From 249f6aaeda84147d59059b5d50bfced43415143e Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 19 Jul 2012 21:35:27 +0000 Subject: Fixed previous commit date in changelog --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 77499c5..587333d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2012-07-?? Francois Vogel +2012-07-19 Francois Vogel * unix/tkUnixMenuBu.c: [Bug 3545457]: Crash on packing a menubutton -- cgit v0.12 From c315d3e456e6fe5c0abc226702265e84c68dac35 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Jul 2012 22:53:30 +0000 Subject: Fix for [Bug 3546073]: Replace Tk_CreateWindow(... DisplayString(dispPtr->display)) with direct call to TkAllocWindow(). --- generic/tkClipboard.c | 7 ++----- unix/tkUnixSend.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 9428894..168171b 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -645,11 +645,8 @@ TkClipInit( * and set up an event handler for it. */ - dispPtr->clipWindow = Tk_CreateWindow(interp, (Tk_Window) NULL, - "_clip", DisplayString(dispPtr->display)); - if (dispPtr->clipWindow == NULL) { - return TCL_ERROR; - } + dispPtr->clipWindow = TkAllocWindow(dispPtr, + DefaultScreen(dispPtr->display), NULL); Tcl_Preserve((ClientData) dispPtr->clipWindow); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->clipWindow, CWOverrideRedirect, &atts); diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index c073309..493100e 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1350,11 +1350,8 @@ SendInit( * for it. */ - dispPtr->commTkwin = Tk_CreateWindow(interp, (Tk_Window) NULL, - "_comm", DisplayString(dispPtr->display)); - if (dispPtr->commTkwin == NULL) { - Tcl_Panic("Tk_CreateWindow failed in SendInit!"); - } + dispPtr->commTkwin = TkAllocWindow(dispPtr, + DefaultScreen(dispPtr->display), NULL); Tcl_Preserve((ClientData) dispPtr->commTkwin); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->commTkwin, -- cgit v0.12 From 5622724370381defbc456e36d2d5e6234cb964e8 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 24 Jul 2012 13:13:08 +0000 Subject: silence compiler warnings --- generic/tkClipboard.c | 2 +- unix/tkUnixSend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 168171b..09e600a 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -645,7 +645,7 @@ TkClipInit( * and set up an event handler for it. */ - dispPtr->clipWindow = TkAllocWindow(dispPtr, + dispPtr->clipWindow = (Tk_Window) TkAllocWindow(dispPtr, DefaultScreen(dispPtr->display), NULL); Tcl_Preserve((ClientData) dispPtr->clipWindow); atts.override_redirect = True; diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 493100e..f376d79 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1350,7 +1350,7 @@ SendInit( * for it. */ - dispPtr->commTkwin = TkAllocWindow(dispPtr, + dispPtr->commTkwin = (Tk_Window) TkAllocWindow(dispPtr, DefaultScreen(dispPtr->display), NULL); Tcl_Preserve((ClientData) dispPtr->commTkwin); atts.override_redirect = True; -- cgit v0.12 From f08c951bcbfe0902d52e21f40daeff65fae386ac Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 25 Jul 2012 08:43:57 +0000 Subject: sync with TEA --- unix/install-sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/install-sh b/unix/install-sh index 5975819..7c34c3f 100644 --- a/unix/install-sh +++ b/unix/install-sh @@ -120,7 +120,7 @@ Options: -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. - -S $stripprog installed files. + -S $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. @@ -156,8 +156,8 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; --S) stripcmd="$stripprog $2" - shift;; + -S) stripcmd="$stripprog $2" + shift;; -t) dst_arg=$2 shift;; -- cgit v0.12 From b2b3c577fdb9020f4d824c91976698c55cf1f518 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 25 Jul 2012 15:49:42 +0000 Subject: update changes --- changes | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/changes b/changes index 9f82083..2cb8571 100644 --- a/changes +++ b/changes @@ -6838,6 +6838,10 @@ and -to (porter) 2012-06-11 (bug fix)[3294450] ttk text element clipping (oehlmann,fellows) +2012-07-02 (bug fix) Make sure all index tables are static (kirkham,english) + +2012-07-23 (bug fix)[3546073] DisplayString() -> DefaultDisplay() (english) + Many revisions to better support a Cygwin environment (nijtmans) ---- Released 8.5.12, July 20, 2012 --- See ChangeLog for details --- +--- Released 8.5.12, July 27, 2012 --- See ChangeLog for details --- -- cgit v0.12 From 120c8a0602b5e973ce7b1ec47c786230ca18fdad Mon Sep 17 00:00:00 2001 From: jenglish Date: Tue, 31 Jul 2012 05:07:14 +0000 Subject: Backport fix for [Bug 3546073] --- generic/tkClipboard.c | 7 ++----- unix/tkUnixSend.c | 8 +++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 8c37f09..e4d5c8e 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -655,11 +655,8 @@ TkClipInit(interp, dispPtr) * and set up an event handler for it. */ - dispPtr->clipWindow = Tk_CreateWindow(interp, (Tk_Window) NULL, - "_clip", DisplayString(dispPtr->display)); - if (dispPtr->clipWindow == NULL) { - return TCL_ERROR; - } + dispPtr->clipWindow = (Tk_Window) TkAllocWindow(dispPtr, + DefaultScreen(dispPtr->display), NULL); Tcl_Preserve((ClientData) dispPtr->clipWindow); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->clipWindow, CWOverrideRedirect, &atts); diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 2b54506..f6ad7b5 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1314,11 +1314,9 @@ SendInit(interp, dispPtr) * event handler for it. */ - dispPtr->commTkwin = Tk_CreateWindow(interp, (Tk_Window) NULL, - "_comm", DisplayString(dispPtr->display)); - if (dispPtr->commTkwin == NULL) { - panic("Tk_CreateWindow failed in SendInit!"); - } + dispPtr->commTkwin = (Tk_Window) TkAllocWindow(dispPtr, + DefaultScreen(dispPtr->display), NULL); + Tcl_Preserve((ClientData) dispPtr->commTkwin); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->commTkwin, -- cgit v0.12 From 35697b9883ec9c6d00bcea66d572bd3c2c2790b1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 31 Jul 2012 10:51:01 +0000 Subject: Backport nmakehlp.c from Tcl 8.6, but add -Q option from sampleextension --- ChangeLog | 5 + win/nmakehlp.c | 327 ++++++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 272 insertions(+), 60 deletions(-) diff --git a/ChangeLog b/ChangeLog index 587333d..81cd1f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-31 Jan Nijtmans + + * win/nmakehlp.c: Backport from Tcl 8.6, but add -Q option from + sampleextension. + 2012-07-19 Francois Vogel * unix/tkUnixMenuBu.c: [Bug 3545457]: Crash on packing a menubutton diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 4657c81..2868857 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -5,21 +5,33 @@ * This is used to fix limitations within nmake and the environment. * * Copyright (c) 2002 by David Gravereaux. + * Copyright (c) 2006 by Pat Thoyts * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. * ---------------------------------------------------------------------------- */ #define _CRT_SECURE_NO_DEPRECATE #include +#define NO_SHLWAPI_GDI +#define NO_SHLWAPI_STREAM +#define NO_SHLWAPI_REG +#include #pragma comment (lib, "user32.lib") #pragma comment (lib, "kernel32.lib") +#pragma comment (lib, "shlwapi.lib") #include #include + +/* + * This library is required for x64 builds with _some_ versions of MSVC + */ #if defined(_M_IA64) || defined(_M_AMD64) +#if _MSC_VER >= 1400 && _MSC_VER < 1500 #pragma comment(lib, "bufferoverflowU") #endif +#endif /* ISO hack for dumb VC++ */ #ifdef _MSC_VER @@ -30,11 +42,13 @@ /* protos */ -int CheckForCompilerFeature(const char *option); -int CheckForLinkerFeature(const char *option); -int IsIn(const char *string, const char *substring); -int GrepForDefine(const char *file, const char *string); -DWORD WINAPI ReadFromPipe(LPVOID args); +static int CheckForCompilerFeature(const char *option); +static int CheckForLinkerFeature(const char *option); +static int IsIn(const char *string, const char *substring); +static int SubstituteFile(const char *substs, const char *filename); +static int QualifyPath(const char *path); +static const char *GetVersionFromFile(const char *filename, const char *match); +static DWORD WINAPI ReadFromPipe(LPVOID args); /* globals */ @@ -116,22 +130,46 @@ main( } else { return IsIn(argv[2], argv[3]); } - case 'g': + case 's': if (argc == 2) { chars = snprintf(msg, sizeof(msg) - 1, - "usage: %s -g \n" - "grep for a #define\n" - "exitcodes: integer of the found string (no decimals)\n", + "usage: %s -s \n" + "Perform a set of string map type substutitions on a file\n" + "exitcodes: 0\n", argv[0]); WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL); return 2; } - return GrepForDefine(argv[2], argv[3]); + return SubstituteFile(argv[2], argv[3]); + case 'V': + if (argc != 4) { + chars = snprintf(msg, sizeof(msg) - 1, + "usage: %s -V filename matchstring\n" + "Extract a version from a file:\n" + "eg: pkgIndex.tcl \"package ifneeded http\"", + argv[0]); + WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, + &dwWritten, NULL); + return 0; + } + printf("%s\n", GetVersionFromFile(argv[2], argv[3])); + return 0; + case 'Q': + if (argc != 3) { + chars = snprintf(msg, sizeof(msg) - 1, + "usage: %s -Q path\n" + "Emit the fully qualified path\n" + "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]); + WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, + &dwWritten, NULL); + return 2; + } + return QualifyPath(argv[2]); } } chars = snprintf(msg, sizeof(msg) - 1, - "usage: %s -c|-l|-f ...\n" + "usage: %s -c|-f|-l|-Q|-s|-V ...\n" "This is a little helper app to equalize shell differences between WinNT and\n" "Win9x and get nmake.exe to accomplish its job.\n", argv[0]); @@ -139,7 +177,7 @@ main( return 2; } -int +static int CheckForCompilerFeature( const char *option) { @@ -190,7 +228,7 @@ CheckForCompilerFeature( * Base command line. */ - lstrcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X "); + lstrcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X -Fp.\\_junk.pch "); /* * Append our option for testing @@ -268,10 +306,12 @@ CheckForCompilerFeature( return !(strstr(Out.buffer, "D4002") != NULL || strstr(Err.buffer, "D4002") != NULL || strstr(Out.buffer, "D9002") != NULL - || strstr(Err.buffer, "D9002") != NULL); + || strstr(Err.buffer, "D9002") != NULL + || strstr(Out.buffer, "D2021") != NULL + || strstr(Err.buffer, "D2021") != NULL); } -int +static int CheckForLinkerFeature( const char *option) { @@ -391,12 +431,12 @@ CheckForLinkerFeature( */ return !(strstr(Out.buffer, "LNK1117") != NULL || - strstr(Err.buffer, "LNK1117") != NULL || - strstr(Out.buffer, "LNK4044") != NULL || - strstr(Err.buffer, "LNK4044") != NULL); + strstr(Err.buffer, "LNK1117") != NULL || + strstr(Out.buffer, "LNK4044") != NULL || + strstr(Err.buffer, "LNK4044") != NULL); } -DWORD WINAPI +static DWORD WINAPI ReadFromPipe( LPVOID args) { @@ -421,7 +461,7 @@ ReadFromPipe( return 0; /* makes the compiler happy */ } -int +static int IsIn( const char *string, const char *substring) @@ -430,58 +470,225 @@ IsIn( } /* - * Find a specified #define by name. - * - * If the line is '#define TCL_VERSION "8.5"', it returns 85 as the result. + * GetVersionFromFile -- + * Looks for a match string in a file and then returns the version + * following the match where a version is anything acceptable to + * package provide or package ifneeded. */ -int -GrepForDefine( - const char *file, - const char *string) +static const char * +GetVersionFromFile( + const char *filename, + const char *match) { - FILE *f; - char s1[51], s2[51], s3[51]; - int r = 0; - double d1; + size_t cbBuffer = 100; + static char szBuffer[100]; + char *szResult = NULL; + FILE *fp = fopen(filename, "rt"); - f = fopen(file, "rt"); - if (f == NULL) { - return 0; - } + if (fp != NULL) { + /* + * Read data until we see our match string. + */ - do { - r = fscanf(f, "%50s", s1); - if (r == 1 && !strcmp(s1, "#define")) { - /* - * Get next two words. - */ - - r = fscanf(f, "%50s %50s", s2, s3); - if (r != 2) { - continue; - } + while (fgets(szBuffer, cbBuffer, fp) != NULL) { + LPSTR p, q; - /* - * Is the first word what we're looking for? - */ + p = strstr(szBuffer, match); + if (p != NULL) { + /* + * Skip to first digit. + */ - if (!strcmp(s2, string)) { - fclose(f); + while (*p && !isdigit(*p)) { + ++p; + } /* - * Add 1 past first double quote char. "8.5" + * Find ending whitespace. */ - d1 = atof(s3 + 1); /* 8.5 */ - while (floor(d1) != d1) { - d1 *= 10.0; + q = p; + while (*q && (isalnum(*q) || *q == '.')) { + ++q; } - return ((int) d1); /* 85 */ + + memcpy(szBuffer, p, q - p); + szBuffer[q-p] = 0; + szResult = szBuffer; + break; } } - } while (!feof(f)); + fclose(fp); + } + return szResult; +} + +/* + * List helpers for the SubstituteFile function + */ + +typedef struct list_item_t { + struct list_item_t *nextPtr; + char * key; + char * value; +} list_item_t; - fclose(f); +/* insert a list item into the list (list may be null) */ +static list_item_t * +list_insert(list_item_t **listPtrPtr, const char *key, const char *value) +{ + list_item_t *itemPtr = malloc(sizeof(list_item_t)); + if (itemPtr) { + itemPtr->key = strdup(key); + itemPtr->value = strdup(value); + itemPtr->nextPtr = NULL; + + while(*listPtrPtr) { + listPtrPtr = &(*listPtrPtr)->nextPtr; + } + *listPtrPtr = itemPtr; + } + return itemPtr; +} + +static void +list_free(list_item_t **listPtrPtr) +{ + list_item_t *tmpPtr, *listPtr = *listPtrPtr; + while (listPtr) { + tmpPtr = listPtr; + listPtr = listPtr->nextPtr; + free(tmpPtr->key); + free(tmpPtr->value); + free(tmpPtr); + } +} + +/* + * SubstituteFile -- + * As windows doesn't provide anything useful like sed and it's unreliable + * to use the tclsh you are building against (consider x-platform builds - + * eg compiling AMD64 target from IX86) we provide a simple substitution + * option here to handle autoconf style substitutions. + * The substitution file is whitespace and line delimited. The file should + * consist of lines matching the regular expression: + * \s*\S+\s+\S*$ + * + * Usage is something like: + * nmakehlp -S << $** > $@ + * @PACKAGE_NAME@ $(PACKAGE_NAME) + * @PACKAGE_VERSION@ $(PACKAGE_VERSION) + * << + */ + +static int +SubstituteFile( + const char *substitutions, + const char *filename) +{ + size_t cbBuffer = 1024; + static char szBuffer[1024], szCopy[1024]; + char *szResult = NULL; + list_item_t *substPtr = NULL; + FILE *fp, *sp; + + fp = fopen(filename, "rt"); + if (fp != NULL) { + + /* + * Build a list of substutitions from the first filename + */ + + sp = fopen(substitutions, "rt"); + if (sp != NULL) { + while (fgets(szBuffer, cbBuffer, sp) != NULL) { + char *ks, *ke, *vs, *ve; + ks = szBuffer; + while (ks && *ks && isspace(*ks)) ++ks; + ke = ks; + while (ke && *ke && !isspace(*ke)) ++ke; + vs = ke; + while (vs && *vs && isspace(*vs)) ++vs; + ve = vs; + while (ve && *ve && !(*ve == '\r' || *ve == '\n')) ++ve; + *ke = 0, *ve = 0; + list_insert(&substPtr, ks, vs); + } + fclose(sp); + } + + /* debug: dump the list */ +#ifdef _DEBUG + { + int n = 0; + list_item_t *p = NULL; + for (p = substPtr; p != NULL; p = p->nextPtr, ++n) { + fprintf(stderr, "% 3d '%s' => '%s'\n", n, p->key, p->value); + } + } +#endif + + /* + * Run the substitutions over each line of the input + */ + + while (fgets(szBuffer, cbBuffer, fp) != NULL) { + list_item_t *p = NULL; + for (p = substPtr; p != NULL; p = p->nextPtr) { + char *m = strstr(szBuffer, p->key); + if (m) { + char *cp, *op, *sp; + cp = szCopy; + op = szBuffer; + while (op != m) *cp++ = *op++; + sp = p->value; + while (sp && *sp) *cp++ = *sp++; + op += strlen(p->key); + while (*op) *cp++ = *op++; + *cp = 0; + memcpy(szBuffer, szCopy, sizeof(szCopy)); + } + } + printf(szBuffer); + } + + list_free(&substPtr); + } + fclose(fp); + return 0; +} + +/* + * QualifyPath -- + * + * This composes the current working directory with a provided path + * and returns the fully qualified and normalized path. + * Mostly needed to setup paths for testing. + */ + +static int +QualifyPath( + const char *szPath) +{ + char szCwd[MAX_PATH + 1]; + char szTmp[MAX_PATH + 1]; + char *p; + GetCurrentDirectory(MAX_PATH, szCwd); + while ((p = strchr(szPath, '/')) && *p) + *p = '\\'; + PathCombine(szTmp, szCwd, szPath); + PathCanonicalize(szCwd, szTmp); + printf("%s\n", szCwd); return 0; } + +/* + * Local variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * indent-tabs-mode: t + * tab-width: 8 + * End: + */ -- cgit v0.12 From 1818e98f85c25d23abd204d5554734eaf435d308 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 31 Jul 2012 14:47:12 +0000 Subject: [Bug 3551802]: Convert from XKeycodeToKeysym to XkbKeycodeToKeysym to fix deprecation warning. --- ChangeLog | 6 ++++++ unix/tkUnixKey.c | 22 ++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c5f0e7..0a98897 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-31 Donal K. Fellows + + * unix/tkUnixKey.c (TkpSetKeycodeAndState, TkpInitKeymapInfo) + (TkpGetKeySym): [Bug 3551802]: Convert from XKeycodeToKeysym to + XkbKeycodeToKeysym to fix deprecation warning. + 2012-07-31 Jan Nijtmans * win/nmakehlp.c: Backport from Tcl 8.6, but add -Q option from diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index 7461d75..b3f5b93 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -11,6 +11,7 @@ */ #include "tkInt.h" +#include /* * Prototypes for local functions defined in this file: @@ -210,8 +211,8 @@ TkpGetString( /* * When mapping from a keysym to a keycode, need information about the - * modifier state that should be used so that when they call XKeycodeToKeysym - * taking into account the xkey.state, they will get back the original keysym. + * modifier state tp be used so that when they call XkbKeycodeToKeysym taking + * into account the xkey.state, they will get back the original keysym. */ void @@ -230,7 +231,7 @@ TkpSetKeycodeAndState( keycode = XKeysymToKeycode(display, keySym); if (keycode != 0) { for (state = 0; state < 4; state++) { - if (XKeycodeToKeysym(display, keycode, state) == keySym) { + if (XkbKeycodeToKeysym(display, keycode, 0, state) == keySym){ if (state & 1) { eventPtr->xkey.state |= ShiftMask; } @@ -320,7 +321,8 @@ TkpGetKeySym( && (eventPtr->xkey.state & LockMask))) { index += 1; } - sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, index); + sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, 0, + index); /* * Special handling: if the key was shifted because of Lock, but lock is @@ -334,8 +336,8 @@ TkpGetKeySym( || ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) || ((sym >= XK_Ooblique) && (sym <= XK_Thorn)))) { index &= ~1; - sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, - index); + sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, + 0, index); } } @@ -345,8 +347,8 @@ TkpGetKeySym( */ if ((index & 1) && (sym == NoSymbol)) { - sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, - index & ~1); + sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, + 0, index & ~1); } return sym; } @@ -395,7 +397,7 @@ TkpInitKeymapInfo( if (*codePtr == 0) { continue; } - keysym = XKeycodeToKeysym(dispPtr->display, *codePtr, 0); + keysym = XkbKeycodeToKeysym(dispPtr->display, *codePtr, 0, 0); if (keysym == XK_Shift_Lock) { dispPtr->lockUsage = LU_SHIFT; break; @@ -421,7 +423,7 @@ TkpInitKeymapInfo( if (*codePtr == 0) { continue; } - keysym = XKeycodeToKeysym(dispPtr->display, *codePtr, 0); + keysym = XkbKeycodeToKeysym(dispPtr->display, *codePtr, 0, 0); if (keysym == XK_Mode_switch) { dispPtr->modeModMask |= ShiftMask << (i/modMapPtr->max_keypermod); } -- cgit v0.12 From 289e63ea56c1a6d3384f6bdeee3b9a47847f3206 Mon Sep 17 00:00:00 2001 From: jenglish Date: Tue, 31 Jul 2012 18:11:01 +0000 Subject: ttk::entry: Fix incorrect clip region computation [Bug 3552404] --- generic/ttk/ttkEntry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 6eccf51..a3d0179 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1225,10 +1225,10 @@ static void EntryDisplay(void *clientData, Drawable d) * clipping area from the GC, so we have to supply that by other means. */ - rect.x = entryPtr->entry.layoutX; - rect.y = entryPtr->entry.layoutY; + rect.x = textarea.x; + rect.y = textarea.y; rect.width = textarea.width; - rect.height = entryPtr->entry.layoutHeight; + rect.height = textarea.height; clipRegion = TkCreateRegion(); TkUnionRectWithRegion(&rect, clipRegion, clipRegion); #ifdef HAVE_XFT -- cgit v0.12 From 896992cf6649443a6421ab8448b7e920931cba8c Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 31 Jul 2012 20:21:57 +0000 Subject: [Bug 3551802]: Convert from XKeycodeToKeysym to XkbKeycodeToKeysym to fix deprecation warning. --- ChangeLog | 6 ++++++ unix/tkUnixKey.c | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81cd1f7..f1d79a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-31 Donal K. Fellows + + * unix/tkUnixKey.c (TkpSetKeycodeAndState, TkpInitKeymapInfo) + (TkpGetKeySym): [Bug 3551802]: Convert from XKeycodeToKeysym to + XkbKeycodeToKeysym to fix deprecation warning. + 2012-07-31 Jan Nijtmans * win/nmakehlp.c: Backport from Tcl 8.6, but add -Q option from diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index 8753fdb..ee77cab 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -11,6 +11,7 @@ */ #include "tkInt.h" +#include /* * Prototypes for local procedures defined in this file: @@ -155,7 +156,7 @@ TkpGetString(winPtr, eventPtr, dsPtr) /* * When mapping from a keysym to a keycode, need * information about the modifier state that should be used - * so that when they call XKeycodeToKeysym taking into + * so that when they call XkbKeycodeToKeysym taking into * account the xkey.state, they will get back the original * keysym. */ @@ -179,7 +180,7 @@ TkpSetKeycodeAndState(tkwin, keySym, eventPtr) } if (keycode != 0) { for (state = 0; state < 4; state++) { - if (XKeycodeToKeysym(display, keycode, state) == keySym) { + if (XkbKeycodeToKeysym(display, keycode, 0, state) == keySym) { if (state & 1) { eventPtr->xkey.state |= ShiftMask; } @@ -248,7 +249,8 @@ TkpGetKeySym(dispPtr, eventPtr) && (eventPtr->xkey.state & LockMask))) { index += 1; } - sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, index); + sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, 0, + index); /* * Special handling: if the key was shifted because of Lock, but @@ -263,8 +265,8 @@ TkpGetKeySym(dispPtr, eventPtr) || ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) || ((sym >= XK_Ooblique) && (sym <= XK_Thorn)))) { index &= ~1; - sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, - index); + sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, + 0, index); } } @@ -274,8 +276,8 @@ TkpGetKeySym(dispPtr, eventPtr) */ if ((index & 1) && (sym == NoSymbol)) { - sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, - index & ~1); + sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, + 0, index & ~1); } return sym; } @@ -325,7 +327,7 @@ TkpInitKeymapInfo(dispPtr) if (*codePtr == 0) { continue; } - keysym = XKeycodeToKeysym(dispPtr->display, *codePtr, 0); + keysym = XkbKeycodeToKeysym(dispPtr->display, *codePtr, 0, 0); if (keysym == XK_Shift_Lock) { dispPtr->lockUsage = LU_SHIFT; break; @@ -351,7 +353,7 @@ TkpInitKeymapInfo(dispPtr) if (*codePtr == 0) { continue; } - keysym = XKeycodeToKeysym(dispPtr->display, *codePtr, 0); + keysym = XkbKeycodeToKeysym(dispPtr->display, *codePtr, 0, 0); if (keysym == XK_Mode_switch) { dispPtr->modeModMask |= ShiftMask << (i/modMapPtr->max_keypermod); } -- cgit v0.12