summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-03-31 13:11:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-03-31 13:11:02 (GMT)
commit37ffc5d06afe069f7266b77571fbb1442af47dc0 (patch)
treeac67d7f4a9e1008c67b5101426bd649921b98ac2
parentaca8f6e571da1e5aeb078efae38cb33c3e5f3228 (diff)
parentb067e33b380775ccdb269def17dfb8699f22bf5a (diff)
downloadtk-37ffc5d06afe069f7266b77571fbb1442af47dc0.zip
tk-37ffc5d06afe069f7266b77571fbb1442af47dc0.tar.gz
tk-37ffc5d06afe069f7266b77571fbb1442af47dc0.tar.bz2
merge 8.6
-rw-r--r--doc/keysyms.n11
-rw-r--r--generic/ks_names.h19
-rw-r--r--generic/tkTextBTree.c3
-rw-r--r--tests/safe.test8
-rw-r--r--win/tkWinKey.c11
-rw-r--r--xlib/X11/keysymdef.h12
6 files changed, 56 insertions, 8 deletions
diff --git a/doc/keysyms.n b/doc/keysyms.n
index bf81440..512c1a6 100644
--- a/doc/keysyms.n
+++ b/doc/keysyms.n
@@ -15,7 +15,9 @@ Tk recognizes many keysyms when specifying key bindings (e.g.,
.QW "\fBbind\fR \fB. <Key-\fR\fIkeysym\fR\fB>\fR" ).
The following list enumerates the
keysyms that will be recognized by Tk. Note that not all keysyms will
-be valid on all platforms. For example, on Unix systems, the presence
+be valid on all platforms, and some keysyms are also available on
+platforms that have a different native name for that key.
+For example, on Unix systems, the presence
of a particular keysym is dependant on the configuration of the
keyboard modifier map. This list shows keysyms along with their
decimal and hexadecimal values.
@@ -918,6 +920,13 @@ Super_R 65516 0xffec
Hyper_L 65517 0xffed
Hyper_R 65518 0xffee
Delete 65535 0xffff
+XF86AudioLowerVolume 269025041 0x1008FF11
+XF86AudioMute 269025042 0x1008FF12
+XF86AudioRaiseVolume 269025043 0x1008FF13
+XF86AudioPlay 269025044 0x1008FF14
+XF86AudioStop 269025045 0x1008FF15
+XF86AudioPrev 269025046 0x1008FF16
+XF86AudioNext 269025047 0x1008FF17
.CE
.SH "SEE ALSO"
bind(n), event(n)
diff --git a/generic/ks_names.h b/generic/ks_names.h
index 22d9fc5..9f49130 100644
--- a/generic/ks_names.h
+++ b/generic/ks_names.h
@@ -1,5 +1,15 @@
/*
- * This file is generated from $(INCLUDESRC)/keysymdef.h. Do not edit.
+ * This file should be maintained in sync with xlib/X11/keysymdefs.h
+ *
+ * Note that this should be done manually only, because in some cases
+ * keysymdefs.h defines the same integer for multiple keysyms, e.g.:
+ *
+ * #define XK_Greek_LAMDA 0x7cb
+ * #define XK_Greek_LAMBDA 0x7cb
+ *
+ * #define XK_Cyrillic_DZHE 0x6bf
+ * #define XK_Serbian_DZE 0x6bf (deprecated)
+ *
*/
{ "BackSpace", 0xFF08 },
{ "Tab", 0xFF09 },
@@ -920,3 +930,10 @@
{ "hebrew_shin", 0xcf9 },
{ "hebrew_taf", 0xcfa },
{ "Hebrew_switch", 0xFF7E },
+{ "XF86AudioLowerVolume", 0x1008FF11 },
+{ "XF86AudioMute", 0x1008FF12 },
+{ "XF86AudioRaiseVolume", 0x1008FF13 },
+{ "XF86AudioPlay", 0x1008FF14 },
+{ "XF86AudioStop", 0x1008FF15 },
+{ "XF86AudioPrev", 0x1008FF16 },
+{ "XF86AudioNext", 0x1008FF17 },
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c
index 0fdc280..db0d71a 100644
--- a/generic/tkTextBTree.c
+++ b/generic/tkTextBTree.c
@@ -1439,6 +1439,7 @@ TkBTreeDeleteIndexRange(
prevNodePtr->nextPtr = curNodePtr->nextPtr;
}
parentPtr->numChildren--;
+ ckfree(curNodePtr->numPixels);
ckfree(curNodePtr);
curNodePtr = parentPtr;
}
@@ -4185,6 +4186,7 @@ Rebalance(
treePtr->rootPtr = nodePtr->children.nodePtr;
treePtr->rootPtr->parentPtr = NULL;
DeleteSummaries(nodePtr->summaryPtr);
+ ckfree(nodePtr->numPixels);
ckfree(nodePtr);
}
return;
@@ -4274,6 +4276,7 @@ Rebalance(
nodePtr->nextPtr = otherPtr->nextPtr;
nodePtr->parentPtr->numChildren--;
DeleteSummaries(otherPtr->summaryPtr);
+ ckfree(otherPtr->numPixels);
ckfree(otherPtr);
continue;
}
diff --git a/tests/safe.test b/tests/safe.test
index 69a67ba..475d938 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -15,7 +15,7 @@ namespace import -force tcltest::test
# Can't find a usable tk.tcl in the following directories:
# {$p(:26:)}
-#
+#
# $p(:26:)/tk.tcl: script error
# script error
# invoked from within
@@ -23,8 +23,8 @@ namespace import -force tcltest::test
# ("uplevel" body line 1)
# invoked from within
# "uplevel #0 [list source $file]"
-#
-#
+#
+#
# This probably means that tk wasn't installed properly.
## it indicates that something went wrong sourcing tk.tcl.
@@ -33,7 +33,7 @@ namespace import -force tcltest::test
# The set of hidden commands is platform dependent:
-set hidden_cmds {bell cd clipboard encoding exec exit fconfigure glob grab load menu open pwd selection socket source toplevel unload wm}
+set hidden_cmds {bell cd clipboard encoding exec exit fconfigure glob grab load menu open pwd selection socket source tcl:encoding:dirs toplevel unload wm}
lappend hidden_cmds {*}[apply {{} {
foreach cmd {
atime attributes copy delete dirname executable exists extension
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index 1ebf312..357a804 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -21,7 +21,8 @@
* like a worthwhile improvement to use the table.
*/
-#define MAX_KEYCODE 145 /* VK_SCROLL is the last entry in our table below */
+#define MAX_KEYCODE 179 /* VK_MEDIA_PLAY_PAUSE is the last entry in our table below */
+/* cf. https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx */
static const KeySym keymap[] = {
NoSymbol, NoSymbol, NoSymbol, XK_Cancel, NoSymbol,
@@ -53,7 +54,13 @@ static const KeySym keymap[] = {
XK_F19, XK_F20, XK_F21, XK_F22, XK_F23,
XK_F24, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol, XK_Num_Lock,
- XK_Scroll_Lock
+ XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*150 0x96*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*155 0x9b*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*160 0xa0*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*165 0xa5*/
+ NoSymbol, NoSymbol, NoSymbol, XK_XF86AudioMute, XK_XF86AudioLowerVolume, /*170 0xaa*/
+ XK_XF86AudioRaiseVolume, XK_XF86AudioNext, XK_XF86AudioPrev, XK_XF86AudioStop, XK_XF86AudioPlay /*175 0xaf*/
};
/*
diff --git a/xlib/X11/keysymdef.h b/xlib/X11/keysymdef.h
index b22d41b..a7c654d 100644
--- a/xlib/X11/keysymdef.h
+++ b/xlib/X11/keysymdef.h
@@ -1167,3 +1167,15 @@ SOFTWARE.
#define XK_Hebrew_switch 0xFF7E /* Alias for mode_switch */
#endif /* XK_HEBREW */
+/* Multimedia keys, defined same as on Linux
+ * /usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon-keysyms.h
+ */
+
+#define XK_XF86AudioLowerVolume 0x1008FF11 /* Volume control down */
+#define XK_XF86AudioMute 0x1008FF12 /* Mute sound from the system */
+#define XK_XF86AudioRaiseVolume 0x1008FF13 /* Volume control up */
+#define XK_XF86AudioPlay 0x1008FF14 /* Start playing of audio > */
+#define XK_XF86AudioStop 0x1008FF15 /* Stop playing audio */
+#define XK_XF86AudioPrev 0x1008FF16 /* Previous track */
+#define XK_XF86AudioNext 0x1008FF17 /* Next track */
+