summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--generic/tkBind.c8
-rw-r--r--generic/tkInt.h8
3 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4eea260..9934df6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2002-06-14 Jeff Hobbs <jeffh@ActiveState.com>
+ * generic/tkBind.c (HandleEventGenerate):
+ * generic/tkInt.h: changed warpInProgress boolean from int to a
+ bit in the flags variable (TK_DISPLAY_IN_WARP)
+
* generic/tkCmds.c (Tk_TkObjCmd):
* unix/tkUnixKey.c (TkpGetString):
* generic/tkEvent.c (Tk_HandleEvent):
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 198eb92..e472d8e 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.23 2002/06/14 23:16:24 mdejong Exp $
+ * RCS: @(#) $Id: tkBind.c,v 1.24 2002/06/15 02:15:51 hobbs Exp $
*/
#include "tkPort.h"
@@ -3792,9 +3792,9 @@ HandleEventGenerate(interp, mainWin, objc, objv)
if ((warp != 0) && Tk_IsMapped(tkwin)) {
TkDisplay *dispPtr;
dispPtr = TkGetDisplay(event.xmotion.display);
- if (!dispPtr->warpInProgress) {
+ if (!(dispPtr->flags & TK_DISPLAY_IN_WARP)) {
Tcl_DoWhenIdle(DoWarp, (ClientData) dispPtr);
- dispPtr->warpInProgress = 1;
+ dispPtr->flags |= TK_DISPLAY_IN_WARP;
}
dispPtr->warpWindow = event.xany.window;
dispPtr->warpX = event.xkey.x;
@@ -3863,7 +3863,7 @@ DoWarp(clientData)
XWarpPointer(dispPtr->display, (Window) None, (Window) dispPtr->warpWindow,
0, 0, 0, 0, (int) dispPtr->warpX, (int) dispPtr->warpY);
XForceScreenSaver(dispPtr->display, ScreenSaverReset);
- dispPtr->warpInProgress = 0;
+ dispPtr->flags &= ~TK_DISPLAY_IN_WARP;
}
/*
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 4a7e74c..e2a3eb6 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -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: tkInt.h,v 1.48 2002/06/15 02:08:12 hobbs Exp $
+ * RCS: $Id: tkInt.h,v 1.49 2002/06/15 02:15:51 hobbs Exp $
*/
#ifndef _TKINT
@@ -478,7 +478,6 @@ typedef struct TkDisplay {
*/
int mouseButtonState; /* current mouse button state for this
* display */
- int warpInProgress;
Window warpWindow;
int warpX;
int warpY;
@@ -495,18 +494,21 @@ typedef struct TkDisplay {
* Flag values for TkDisplay flags.
* TK_DISPLAY_COLLAPSE_MOTION_EVENTS: (default on)
* Indicates that we should collapse motion events on this display
- * TK_DISPLAY_USE_IM: (default on)
+ * TK_DISPLAY_USE_IM: (default on, set via tk.tcl)
* Whether to use input methods for this display
* TK_DISPLAY_XIM_SPOT: (default off)
* Indicates that we should use over-the-spot XIM on this display
* TK_DISPLAY_WM_TRACING: (default off)
* Whether we should do wm tracing on this display.
+ * TK_DISPLAY_IN_WARP: (default off)
+ * Indicates that we are in a pointer warp
*/
#define TK_DISPLAY_COLLAPSE_MOTION_EVENTS (1 << 0)
#define TK_DISPLAY_USE_IM (1 << 1)
#define TK_DISPLAY_XIM_SPOT (1 << 2)
#define TK_DISPLAY_WM_TRACING (1 << 3)
+#define TK_DISPLAY_IN_WARP (1 << 4)
/*
* One of the following structures exists for each error handler