Attachment "tk-2.patch" to
ticket [47d4f291]
added by
erikleunissen
2024-03-13 15:56:47.
diff -r f22b4cf2bcd7 -r 3b7f0ab633e1 generic/tkCanvas.c
--- a/generic/tkCanvas.c Wed Mar 13 15:13:40 2024 +0100
+++ b/generic/tkCanvas.c Wed Mar 13 15:38:28 2024 +0100
@@ -4963,9 +4963,17 @@
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 -r f22b4cf2bcd7 -r 3b7f0ab633e1 generic/tkTextTag.c
--- a/generic/tkTextTag.c Wed Mar 13 15:13:40 2024 +0100
+++ b/generic/tkTextTag.c Wed Mar 13 15:38:28 2024 +0100
@@ -1803,9 +1803,17 @@
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
+ * canvas items. For the time being, retain the choice from before
+ * ticket #47d4f29159, which doesn't harm.
*/
event.xcrossing.detail = NotifyAncestor;
diff -r 66102923520d -r 1c99a4c945be generic/ttk/ttkWidget.c
--- a/generic/ttk/ttkWidget.c Wed Mar 13 15:39:09 2024 +0100
+++ b/generic/ttk/ttkWidget.c Wed Mar 13 15:40:28 2024 +0100
@@ -242,8 +242,6 @@
* 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.