diff options
author | hobbs <hobbs> | 2000-01-13 02:07:08 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-01-13 02:07:08 (GMT) |
commit | 62d7b7db73ba85f767609d5b5dde1de23d0561dd (patch) | |
tree | 4cc0aa45119d3b6c37ab58d50cf1618329ea1a7d | |
parent | caadb14caf4b6dfe5e4291b37e96709579368fd7 (diff) | |
download | tk-62d7b7db73ba85f767609d5b5dde1de23d0561dd.zip tk-62d7b7db73ba85f767609d5b5dde1de23d0561dd.tar.gz tk-62d7b7db73ba85f767609d5b5dde1de23d0561dd.tar.bz2 |
* doc/event.n:
* generic/tkBind.c: prevented core with event -warp on Windows
when window wasn't mapped [Bug: 4004] and added docs stating
the requirement for mapped windows.
-rw-r--r-- | doc/event.n | 5 | ||||
-rw-r--r-- | generic/tkBind.c | 7 |
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) { |