summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/event.n5
-rw-r--r--generic/tkBind.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/doc/event.n b/doc/event.n
index 90493cd..a8a6cdb 100644
--- a/doc/event.n
+++ b/doc/event.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: event.n,v 1.4 1999/12/14 06:51:44 hobbs Exp $
+'\" RCS: @(#) $Id: event.n,v 1.5 2000/01/13 02:07:08 hobbs Exp $
'\"
.so man.macros
.TH event n 8.3 Tk "Tk Built-In Commands"
@@ -243,7 +243,8 @@ Corresponds to the \fB%t\fR substitution for binding scripts.
\fIboolean\fR must be a boolean value; it specifies whether
the screen pointer should be warped as well.
Valid for \fBKeyPress\fR, \fBKeyRelease\fR, \fBButtonPress\fR,
-\fBButtonRelease\fR, and \fBMotion\fR events.
+\fBButtonRelease\fR, and \fBMotion\fR events. The pointer will
+only warp to a window if it is mapped.
.TP
\fB\-width\fI size\fR
\fISize\fR must be a screen distance; it specifies the \fIwidth\fR field
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 031ded7..5b53a4e 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkBind.c,v 1.9 1999/12/14 06:52:25 hobbs Exp $
+ * RCS: @(#) $Id: tkBind.c,v 1.10 2000/01/13 02:07:10 hobbs Exp $
*/
#include "tkPort.h"
@@ -3691,7 +3691,10 @@ HandleEventGenerate(interp, mainWin, objc, objv)
} else {
Tk_QueueWindowEvent(&event, pos);
}
- if (warp != 0) {
+ /*
+ * We only allow warping if the window is mapped
+ */
+ if ((warp != 0) && Tk_IsMapped(tkwin)) {
TkDisplay *dispPtr;
dispPtr = TkGetDisplay(event.xmotion.display);
if (!dispPtr->warpInProgress) {