From adc21d5c5a4a4e9e5f059f77c2f9f36a946335dc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 2 May 2012 22:11:52 +0000 Subject: unneccessary variable --- generic/tkBind.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/generic/tkBind.c b/generic/tkBind.c index fc212cb..3003f18 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -2625,21 +2625,13 @@ ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr) } case 'X': if (flags & KEY_BUTTON_MOTION_CROSSING) { - Tk_Window tkwin; - number = eventPtr->xkey.x_root; - tkwin = Tk_IdToWindow(eventPtr->xany.display, - eventPtr->xany.window); goto doNumber; } goto doString; case 'Y': if (flags & KEY_BUTTON_MOTION_CROSSING) { - Tk_Window tkwin; - number = eventPtr->xkey.y_root; - tkwin = Tk_IdToWindow(eventPtr->xany.display, - eventPtr->xany.window); goto doNumber; } goto doString; -- cgit v0.12 From cea4902d29e7d1701f4516989eb09a16dbc56af4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 2 May 2012 22:13:06 +0000 Subject: sync tcl.m4 with Tcl version --- unix/configure | 23 +++++++++++++++-------- unix/tcl.m4 | 11 ++++++++--- win/configure | 7 ------- win/tcl.m4 | 4 ---- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/unix/configure b/unix/configure index cebf9a5..434d3aa 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR ac_ct_AR TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT LIBOBJS XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS CFBUNDLELOCALIZATIONS TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR ac_ct_AR TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT LIBOBJS XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS CFBUNDLELOCALIZATIONS TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -7167,12 +7167,23 @@ fi UNSHARED_LIB_SUFFIX='${VERSION}.a' fi + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + if test "${SHLIB_SUFFIX}" = ".dll"; then + + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(BIN_INSTALL_DIR)/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + +else + + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + +fi + else @@ -7328,6 +7339,7 @@ _ACEOF + echo "$as_me:$LINENO: checking for build with symbols" >&5 echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 # Check whether --enable-symbols or --disable-symbols was given. @@ -7364,12 +7376,6 @@ echo "${ECHO_T}yes (standard debugging)" >&6 fi - ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging? - -cat >>confdefs.h <<\_ACEOF -#define TCL_CFG_DEBUG 1 -_ACEOF - if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then @@ -12171,6 +12177,7 @@ s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t s,@MAKE_LIB@,$MAKE_LIB,;t t s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 05a155b..4e0ac62 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -787,8 +787,6 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ fi AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) - ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging? - AC_DEFINE(TCL_CFG_DEBUG, 1, [Is debugging enabled?]) if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) @@ -2095,11 +2093,17 @@ dnl # preprocessing tests use only CPPFLAGS. SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}']) AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [ UNSHARED_LIB_SUFFIX='${VERSION}.a']) + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [ LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [ + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(BIN_INSTALL_DIR)/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + ], [ + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + ]) ], [ LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} @@ -2180,6 +2184,7 @@ dnl # preprocessing tests use only CPPFLAGS. AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(INSTALL_LIB) + AC_SUBST(DLL_INSTALL_DIR) AC_SUBST(INSTALL_STUB_LIB) AC_SUBST(RANLIB) ]) diff --git a/win/configure b/win/configure index 85f61b7..c1a1a23 100755 --- a/win/configure +++ b/win/configure @@ -3374,9 +3374,6 @@ fi if test "$GCC" = "yes"; then - if test "$TCL_CC" = "gcc"; then - CFLAGS="$CFLAGS -mwin32" - fi echo "$as_me:$LINENO: checking for cross-compile version of gcc" >&5 echo $ECHO_N "checking for cross-compile version of gcc... $ECHO_C" >&6 if test "${ac_cv_cross+set}" = set; then @@ -4645,10 +4642,6 @@ echo "${ECHO_T}yes (standard debugging)" >&6 fi - cat >>confdefs.h <<\_ACEOF -#define TCL_CFG_DEBUG 1 -_ACEOF - if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then diff --git a/win/tcl.m4 b/win/tcl.m4 index f97992a..9320d89 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -317,7 +317,6 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ fi AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) - AC_DEFINE(TCL_CFG_DEBUG) if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) @@ -417,9 +416,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ if test "$GCC" = "yes"; then - if test "$TCL_CC" = "gcc"; then - CFLAGS="$CFLAGS -mwin32" - fi AC_CACHE_CHECK(for cross-compile version of gcc, ac_cv_cross, AC_TRY_COMPILE([ -- cgit v0.12 From 39e8bd9a08defb2e168fcd11496ad60e7c0e828e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 4 May 2012 22:05:25 +0000 Subject: [Bug 2768586]: Menu posting problem on dual monitors --- ChangeLog | 4 ++++ library/menu.tcl | 17 ++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index d205485..d04cb05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-05-04 Jan Nijtmans + + * library/menu.tcl: [Bug 2768586]: Menu posting problem on dual monitors + 2012-05-02 Jan Nijtmans * library/tk.tcl: [Bug 533519]: Window placement with multiple screens diff --git a/library/menu.tcl b/library/menu.tcl index ed8182e..ff62484 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -284,8 +284,8 @@ proc ::tk::MbPost {w {x {}} {y {}}} { set x [winfo rootx $w] set y [expr {[winfo rooty $w] - [winfo reqheight $menu]}] # if we go offscreen to the top, show as 'below' - if {$y < 0} { - set y [expr {[winfo rooty $w] + [winfo height $w]}] + if {$y < [winfo vrooty $w]} { + set y [expr {[winfo vrooty $w] + [winfo rooty $w] + [winfo reqheight $w]}] } PostOverPoint $menu $x $y } @@ -294,8 +294,8 @@ proc ::tk::MbPost {w {x {}} {y {}}} { set y [expr {[winfo rooty $w] + [winfo height $w]}] # if we go offscreen to the bottom, show as 'above' set mh [winfo reqheight $menu] - if {($y + $mh) > [winfo screenheight $w]} { - set y [expr {[winfo rooty $w] - $mh}] + if {($y + $mh) > ([winfo vrooty $w] + [winfo vrootheight $w])} { + set y [expr {[winfo vrooty $w] + [winfo vrootheight $w] + [winfo rooty $w] - $mh}] } PostOverPoint $menu $x $y } @@ -1196,16 +1196,15 @@ proc ::tk::PostOverPoint {menu x y {entry {}}} { # entry. To be safe we subtract an extra 10. set yoffset [expr {[winfo screenheight $menu] \ - $y - [winfo reqheight $menu] - 10}] - if {$yoffset < 0} { + if {$yoffset < [winfo vrooty $menu]} { # The bottom of the menu is offscreen, so adjust upwards - incr y $yoffset - if {$y < 0} { set y 0 } + incr y [expr {$yoffset - [winfo vrooty $menu]}] } # If we're off the top of the screen (either because we were # originally or because we just adjusted too far upwards), # then make the menu popup on the top edge. - if {$y < 0} { - set y 0 + if {$y < [winfo vrooty $menu]} { + set y [winfo vrooty $menu] } } $menu post $x $y -- cgit v0.12