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 15, 2024
2 parents f48cf63 + 1ade92d commit 8506774
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jobs:
matrix:
config:
- ""
- "--enable-config=mem"
- "--enable-config=all"
- "--enable-symbols=mem"
- "--enable-symbols=all"
- "--disable-shared"
steps:
- name: Install MSYS2
Expand Down
4 changes: 1 addition & 3 deletions doc/ttk_panedwindow.n
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ Returns the new position of sash number \fIindex\fR.
.SH "VIRTUAL EVENTS"
.PP
The panedwindow widget generates an \fB<<EnteredChild>>\fR virtual event on
LeaveNotify/NotifyInferior events, because Tk does not execute binding scripts
for <Leave> events when the pointer crosses from a parent to a child. The
panedwindow widget needs to know when that happens.
LeaveNotify/NotifyInferior events.
.SH "STYLING OPTIONS"
.PP
The class name for a \fBttk::panedwindow\fP is \fBTPanedwindow\fP. The
Expand Down
14 changes: 11 additions & 3 deletions generic/tkCanvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -5339,9 +5339,17 @@ PickCurrentItem(
event.type = LeaveNotify;

/*
* If the event's detail happens to be NotifyInferior the binding
* mechanism will discard the event. To be consistent, always use
* NotifyAncestor.
* Behaviour before ticket #47d4f29159:
* If the event's detail happens to be NotifyInferior the binding
* mechanism will discard the event. To be consistent, always use
* NotifyAncestor.
*
* Behaviour after ticket #47d4f29159:
* The binding mechanism doesn't discard events with detail field
* NotifyInferior anymore. It would be best to base the detail
* field on the ancestry relationship between the old and new
* canvas items. For the time being, retain the choice from before
* ticket #47d4f29159, which doesn't harm.
*/

event.xcrossing.detail = NotifyAncestor;
Expand Down
14 changes: 11 additions & 3 deletions generic/tkTextTag.c
Original file line number Diff line number Diff line change
Expand Up @@ -1808,9 +1808,17 @@ TkTextPickCurrent(
event.type = LeaveNotify;

/*
* Always use a detail of NotifyAncestor. Besides being
* consistent, this avoids problems where the binding code will
* discard NotifyInferior events.
* Behaviour before ticket #47d4f29159:
* Always use a detail of NotifyAncestor. Besides being
* consistent, this avoids problems where the binding code will
* discard NotifyInferior events.
*
* Behaviour after ticket #47d4f29159:
* The binding mechanism doesn't discard events with detail field
* NotifyInferior anymore. It would be best to base the detail
* field on the ancestry relationship between the old and new
* tags. For the time being, retain the choice from before
* ticket #47d4f29159, which doesn't harm.
*/

event.xcrossing.detail = NotifyAncestor;
Expand Down
14 changes: 8 additions & 6 deletions generic/ttk/ttkPanedwindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,16 @@ static const Ttk_ManagerSpec PanedManagerSpec = {
/*------------------------------------------------------------------------
* +++ Event handler.
*
* <<NOTE-PW-LEAVE-NOTIFYINFERIOR>>
* Tk does not execute binding scripts for <Leave> events when
* the pointer crosses from a parent to a child. This widget
* needs to know when that happens, though, so it can reset
* the cursor.
*
* This event handler generates an <<EnteredChild>> virtual event
* on LeaveNotify/NotifyInferior.
* This was originally introduced because Tk used to discard events with
* detail field NotifyInferior. The <<EnteredChild>> event was then used
* to reset the cursor when the pointer crosses from a parent to a child.
* Since ticket #47d4f29159, LeaveNotify/NotifyInferior are no longer
* discarded: the <Leave> event will trigger even with NotifyInferior
* detail field. The generated <<EnteredChild>> is nevertheless kept for
* backwards compatibility purpose since it is publicly documented,
* meaning that someone could bind to it.
*/

static const unsigned PanedEventMask = LeaveWindowMask;
Expand Down
2 changes: 0 additions & 2 deletions generic/ttk/ttkWidget.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ DestroyWidget(WidgetCore *corePtr)
* For Destroy events, handle the cleanup process.
*
* For Focus events, set/clear the focus bit in the state field.
* It turns out this is impossible to do correctly in a binding script,
* because Tk filters out focus events with detail == NotifyInferior.
*
* For Deactivate/Activate pseudo-events, set/clear the background state
* flag.
Expand Down
2 changes: 0 additions & 2 deletions library/ttk/panedwindow.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ bind TPanedwindow <ButtonRelease-1> { ttk::panedwindow::Release %W %x %y }
bind TPanedwindow <Motion> { ttk::panedwindow::SetCursor %W %x %y }
bind TPanedwindow <Enter> { ttk::panedwindow::SetCursor %W %x %y }
bind TPanedwindow <Leave> { ttk::panedwindow::ResetCursor %W }
# See <<NOTE-PW-LEAVE-NOTIFYINFERIOR>>
bind TPanedwindow <<EnteredChild>> { ttk::panedwindow::ResetCursor %W }

## Sash movement:
#
Expand Down

0 comments on commit 8506774

Please sign in to comment.