Attachment "tk8.6.9.patch" to
ticket [e3888d58]
added by
erikleunissen
2020-01-05 13:49:35.
diff -ur tk8.6.9.old/generic/tkBind.c tk8.6.9.new/generic/tkBind.c
--- tk8.6.9.old/generic/tkBind.c 2018-11-01 16:27:57.000000000 +0100
+++ tk8.6.9.new/generic/tkBind.c 2020-01-05 00:32:05.000000000 +0100
@@ -3463,17 +3463,6 @@
}
/*
- * Now we have constructed the event, inject it into the event handling
- * code.
- */
-
- if (synch != 0) {
- Tk_HandleEvent(&event.general);
- } else {
- Tk_QueueWindowEvent(&event.general, pos);
- }
-
- /*
* We only allow warping if the window is mapped.
*/
@@ -3483,11 +3472,6 @@
Tk_Window warpWindow = Tk_IdToWindow(dispPtr->display,
event.general.xmotion.window);
- if (!(dispPtr->flags & TK_DISPLAY_IN_WARP)) {
- Tcl_DoWhenIdle(DoWarp, dispPtr);
- dispPtr->flags |= TK_DISPLAY_IN_WARP;
- }
-
if (warpWindow != dispPtr->warpWindow) {
if (warpWindow) {
Tcl_Preserve(warpWindow);
@@ -3500,6 +3484,22 @@
dispPtr->warpMainwin = mainWin;
dispPtr->warpX = event.general.xmotion.x;
dispPtr->warpY = event.general.xmotion.y;
+
+ if (!(dispPtr->flags & TK_DISPLAY_IN_WARP)) {
+ Tcl_DoWhenIdle(DoWarp, dispPtr);
+ dispPtr->flags |= TK_DISPLAY_IN_WARP;
+ }
+ }
+
+ /*
+ * Now we have constructed the event, inject it into the event handling
+ * code.
+ */
+
+ if (synch != 0) {
+ Tk_HandleEvent(&event.general);
+ } else {
+ Tk_QueueWindowEvent(&event.general, pos);
}
done:
diff -ur tk8.6.9.old/generic/tkGrab.c tk8.6.9.new/generic/tkGrab.c
--- tk8.6.9.old/generic/tkGrab.c 2018-10-09 21:19:56.000000000 +0200
+++ tk8.6.9.new/generic/tkGrab.c 2020-01-05 00:01:02.000000000 +0100
@@ -790,7 +790,7 @@
return 1;
}
- if (!appGrabbed) {
+ if (!appGrabbed || dispPtr->flags & TK_DISPLAY_IN_WARP) {
return 1;
}