diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-15 08:42:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-15 08:42:29 (GMT) |
commit | 8506774a00771b0f0e637fd68225e9e448f51e50 (patch) | |
tree | 125503019eee67ad5617782a603928d770b33b56 /generic | |
parent | f48cf633835522b4ffc3c1483cfcfdaae6b2ab24 (diff) | |
parent | 1ade92d9af9bbf7ce7b373fef3d8da63e1a76fd5 (diff) | |
download | tk-8506774a00771b0f0e637fd68225e9e448f51e50.zip tk-8506774a00771b0f0e637fd68225e9e448f51e50.tar.gz tk-8506774a00771b0f0e637fd68225e9e448f51e50.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvas.c | 14 | ||||
-rw-r--r-- | generic/tkTextTag.c | 14 | ||||
-rw-r--r-- | generic/ttk/ttkPanedwindow.c | 14 | ||||
-rw-r--r-- | generic/ttk/ttkWidget.c | 2 |
4 files changed, 30 insertions, 14 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index c93baa7..3a0b1b0 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -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; diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index 70eb0a5..ef318b7 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -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; diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index 62b11a4..7cd2fd9 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -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; diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index 21315be..9339aa9 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -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. |