Skip to content

Commit

Permalink
Merge 8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Mar 23, 2024
2 parents 90913ce + e4d5dbc commit 4a635a2
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 14 deletions.
4 changes: 2 additions & 2 deletions doc/ttk_frame.n
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ttk::frame \- Simple container widget
A \fBttk::frame\fR widget is a container, used to group other widgets
together.
.SO ttk_widget
\-class \-cursor \-padding \-style
\-takefocus
\-class \-cursor \-padding
\-style \-takefocus
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-borderwidth borderWidth BorderWidth
Expand Down
7 changes: 4 additions & 3 deletions doc/ttk_label.n
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ A \fBttk::label\fR widget displays a textual label and/or image.
The label may be linked to a Tcl variable
to automatically change the displayed text.
.SO ttk_widget
\-anchor \-class \-compound \-cursor
\-font \-foreground
\-image \-justify \-padding \-state \-style \-takefocus
\-anchor \-class \-compound
\-cursor \-font \-foreground
\-image \-justify \-padding
\-state \-style \-takefocus
\-text \-textvariable \-underline
\-width \-wraplength
.SE
Expand Down
4 changes: 2 additions & 2 deletions doc/ttk_labelframe.n
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ A \fBttk::labelframe\fR widget is a container used to group other widgets
together. It has an optional label, which may be a plain text string or
another widget.
.SO ttk_widget
\-class \-cursor \-padding \-style
\-takefocus
\-class \-cursor \-padding
\-style \-takefocus
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.\" XXX: Currently included, but may go away:
Expand Down
15 changes: 10 additions & 5 deletions doc/ttk_spinbox.n
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ of the \fBttk::entry\fR widget including support of the
\fB\-textvariable\fR option to link the value displayed by the widget
to a Tcl variable.
.SO ttk_widget
\-class \-cursor \-state \-style
\-takefocus \-xscrollcommand \-placeholder \-placeholderforeground
\-class \-cursor \-state
\-style \-takefocus \-xscrollcommand
\-placeholder \-placeholderforeground
.SE
.SO ttk_entry
\-validate \-validatecommand
Expand All @@ -36,15 +37,15 @@ when using the \fB\-from\fR and \fB\-to\fR range.
This must be a format specifier of the form \fB%<pad>.<pad>f\fR,
as it will format a floating-point number.
.OP \-from from From
A floating\-point value specifying the lowest value for the spinbox. This is
A floating-point value specifying the lowest value for the spinbox. This is
used in conjunction with \fB\-to\fR and \fB\-increment\fR to set a numerical
range.
.OP \-increment increment Increment
A floating\-point value specifying the change in value to be applied each
A floating-point value specifying the change in value to be applied each
time one of the widget spin buttons is pressed. The up button applies a
positive increment, the down button applies a negative increment.
.OP \-to to To
A floating\-point value specifying the highest permissible value for the
A floating-point value specifying the highest permissible value for the
widget. See also \fB\-from\fR and \fB\-increment\fR.
range.
.OP \-values values Values
Expand All @@ -66,11 +67,15 @@ See the \fBttk::entry\fR manual for information about using the
.PP
The following subcommands are possible for spinbox widgets in addition to
the commands described for the \fBttk::entry\fR widget:
.\" METHOD: get
.TP
\fIpathName \fBget\fR
.
Returns the spinbox's current value.
.\" METHOD: set
.TP
\fIpathName \fBset \fIvalue\fR
.
Set the spinbox string to \fIvalue\fR. If a \fB\-format\fR option has
been configured then this format will be applied. If formatting fails
or is not set or the \fB\-values\fR option has been used then the value
Expand Down
5 changes: 3 additions & 2 deletions generic/tkFocus.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ typedef struct TkDisplayFocusInfo {

#define DEBUG(dispPtr, arguments) \
if ((dispPtr)->focusDebug) { \
printf arguments; \
printf arguments; fflush(stdout); \
}

/*
Expand Down Expand Up @@ -501,12 +501,13 @@ TkFocusFilterEvent(

if ((dispPtr->implicitWinPtr != NULL)
&& !(winPtr->flags & TK_EMBEDDED)) {
DEBUG(dispPtr, ("Defocussed implicit Async\n"));
DEBUG(dispPtr, ("Defocussed implicit Async from %s\n", displayFocusPtr->focusWinPtr->pathName));
GenerateFocusEvents(displayFocusPtr->focusWinPtr, NULL);
XSetInputFocus(dispPtr->display, PointerRoot, RevertToPointerRoot,
CurrentTime);
displayFocusPtr->focusWinPtr = NULL;
dispPtr->implicitWinPtr = NULL;
dispPtr->focusPtr = NULL;
}
}
return retValue;
Expand Down
23 changes: 23 additions & 0 deletions tests/focus.test
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,29 @@ test focus-7.1 {TkSetFocusWin procedure, unmapped windows} -setup {
destroy .top
} -result {.top.s3}

test focus-8.1 {fdc0ed342d - segfault on focus -force} -body {
pack [button .b0]
toplevel .one
update
event generate .one <Motion> -warp 1 -x 175 -y 175
update idletasks
destroy {*}[winfo children .]
toplevel .t
pack [canvas .t.c]
update
destroy .t.c
pack [label .t.l]
update
destroy .t.l
destroy {*}[winfo children .]
proc crashit {} {
pack [listbox .l]
update
focus -force .l; # This line segfaulted *with xvfb*
set res Reached
}
crashit
} -result {Reached}

deleteWindows

Expand Down

0 comments on commit 4a635a2

Please sign in to comment.