Tk Source Code

Changes On Branch bug-382712ade6
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch bug-382712ade6 Excluding Merge-Ins

This is equivalent to a diff from dc776f94 to 57234208

2020-03-04
12:19
Finalize the fix for ticket [382712ade65] (X11: 'event generate . <KeyPress>' segfault) by documenting the leftover consequence of the fix. check-in: 611f00b7 user: fvogel tags: core-8-6-branch
2020-02-23
14:38
Prevent some textTag tests from triggering hot spots of the Linux KDE/Plasma desktop. What is needed in these tests is to move the mouse out of the test window when the test starts, so that the events expected by the test can be observed. We don't need to move the mouse exactly at the upper-left corner of the screen, we only have to make sure the mouse pointer is outside the test window. check-in: 3125db91 user: fvogel tags: core-8-6-branch
2020-02-17
14:51
Merge 8.6 Closed-Leaf check-in: 57234208 user: jan.nijtmans tags: bug-382712ade6
14:50
Merge 8.6 check-in: 32252102 user: jan.nijtmans tags: bug-e3888d5820
2020-02-16
16:50
Be more exact in the bind.n man page check-in: 76e2a8ab user: fvogel tags: bug-382712ade6
12:42
Merge 8.6 check-in: cb8499e8 user: jan.nijtmans tags: trunk
12:42
Merge 8.5 check-in: dc776f94 user: jan.nijtmans tags: core-8-6-branch
12:26
Don't build static with tcl8.6, that doesn't work (yet). Could be fixed, but not high prio. Add a few "const" specifiers (backported from 8.6) check-in: 499a7d8d user: jan.nijtmans tags: core-8-5-branch
2020-02-14
11:20
Merge-mark check-in: b53c6ab6 user: jan.nijtmans tags: core-8-6-branch

Changes to doc/bind.n.

513
514
515
516
517
518
519
520
521
522

523
524
525
526
527
528
529
530
For \fBEnter\fR and \fBLeave\fR events, the position where the
mouse pointer crossed the window, relative to the receiving window.
For \fBConfigure\fR and \fBCreate\fR requests, the \fIx\fR and \fIy\fR
coordinates of the window relative to its parent window.
.IP \fB%A\fR 5
Substitutes the UNICODE character corresponding to the event, or
the empty string if the event does not correspond to a UNICODE character
(e.g. the shift key was pressed). \fBXmbLookupString\fR (or
\fBXLookupString\fR when input method support is turned off) does all
the work of translating from the event to a UNICODE character.

Valid only for \fBKeyPress\fR and \fBKeyRelease\fR events.
.IP \fB%B\fR 5
The \fIborder_width\fR field from the event.  Valid only for
\fBConfigure\fR, \fBConfigureRequest\fR, and \fBCreate\fR events.
.IP \fB%D\fR 5
This reports the \fIdelta\fR value of a \fBMouseWheel\fR event.  The
\fIdelta\fR value represents the rotation units the mouse wheel has
been moved. The sign of the value represents the direction the mouse







|


>
|







513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
For \fBEnter\fR and \fBLeave\fR events, the position where the
mouse pointer crossed the window, relative to the receiving window.
For \fBConfigure\fR and \fBCreate\fR requests, the \fIx\fR and \fIy\fR
coordinates of the window relative to its parent window.
.IP \fB%A\fR 5
Substitutes the UNICODE character corresponding to the event, or
the empty string if the event does not correspond to a UNICODE character
(e.g. the shift key was pressed). On X11, \fBXmbLookupString\fR (or
\fBXLookupString\fR when input method support is turned off) does all
the work of translating from the event to a UNICODE character.
On X11, valid only for \fBKeyPress\fR event. On Windows and macOS/aqua,
valid only for \fBKeyPress\fR and \fBKeyRelease\fR events.
.IP \fB%B\fR 5
The \fIborder_width\fR field from the event.  Valid only for
\fBConfigure\fR, \fBConfigureRequest\fR, and \fBCreate\fR events.
.IP \fB%D\fR 5
This reports the \fIdelta\fR value of a \fBMouseWheel\fR event.  The
\fIdelta\fR value represents the rotation units the mouse wheel has
been moved. The sign of the value represents the direction the mouse

Changes to unix/tkUnixKey.c.

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
	len = 0;
	Tcl_DStringSetLength(dsPtr, len);
	goto done;
    }

#ifdef TK_USE_INPUT_METHODS
    if ((winPtr->dispPtr->flags & TK_DISPLAY_USE_IM)
	    && (winPtr->inputContext != NULL)
	    && (eventPtr->type == KeyPress)) {
	Status status;

#if X_HAVE_UTF8_STRING
	Tcl_DStringSetLength(dsPtr, TCL_DSTRING_STATIC_SIZE-1);
	len = Xutf8LookupString(winPtr->inputContext, &eventPtr->xkey,
		Tcl_DStringValue(dsPtr), Tcl_DStringLength(dsPtr),
		&kePtr->keysym, &status);







|
<







134
135
136
137
138
139
140
141

142
143
144
145
146
147
148
	len = 0;
	Tcl_DStringSetLength(dsPtr, len);
	goto done;
    }

#ifdef TK_USE_INPUT_METHODS
    if ((winPtr->dispPtr->flags & TK_DISPLAY_USE_IM)
	    && (winPtr->inputContext != NULL)) {

	Status status;

#if X_HAVE_UTF8_STRING
	Tcl_DStringSetLength(dsPtr, TCL_DSTRING_STATIC_SIZE-1);
	len = Xutf8LookupString(winPtr->inputContext, &eventPtr->xkey,
		Tcl_DStringValue(dsPtr), Tcl_DStringLength(dsPtr),
		&kePtr->keysym, &status);
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
	Tcl_DStringFree(&buf);
#endif /* X_HAVE_UTF8_STRING */
    } else
#endif /* TK_USE_INPUT_METHODS */
    {
	/*
	 * Fall back to convert a keyboard event to a UTF-8 string using
	 * XLookupString. This is used when input methods are turned off and
	 * for KeyRelease events.
	 *
	 * Note: XLookupString() normally returns a single ISO Latin 1 or
	 * ASCII control character.
	 */

	Tcl_DStringInit(&buf);
	Tcl_DStringSetLength(&buf, TCL_DSTRING_STATIC_SIZE-1);







|
<







189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
	Tcl_DStringFree(&buf);
#endif /* X_HAVE_UTF8_STRING */
    } else
#endif /* TK_USE_INPUT_METHODS */
    {
	/*
	 * Fall back to convert a keyboard event to a UTF-8 string using
	 * XLookupString. This is used when input methods are turned off.

	 *
	 * Note: XLookupString() normally returns a single ISO Latin 1 or
	 * ASCII control character.
	 */

	Tcl_DStringInit(&buf);
	Tcl_DStringSetLength(&buf, TCL_DSTRING_STATIC_SIZE-1);