summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-06-15 02:15:51 (GMT)
committerhobbs <hobbs@noemail.net>2002-06-15 02:15:51 (GMT)
commitf84bbe2b30148c4c0aa187ba36d4dda39beea8fd (patch)
tree10960247ed817110117b99b41508fcc2c6f42d16 /generic
parentdc09fc47d4599864459df7997f1cbe363a1200e0 (diff)
downloadtk-f84bbe2b30148c4c0aa187ba36d4dda39beea8fd.zip
tk-f84bbe2b30148c4c0aa187ba36d4dda39beea8fd.tar.gz
tk-f84bbe2b30148c4c0aa187ba36d4dda39beea8fd.tar.bz2
* generic/tkBind.c (HandleEventGenerate):
* generic/tkInt.h: changed warpInProgress boolean from int to a bit in the flags variable (TK_DISPLAY_IN_WARP) FossilOrigin-Name: 6c6a1f616f68808270aa1c99e33da30973656a4c
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c8
-rw-r--r--generic/tkInt.h8
2 files changed, 9 insertions, 7 deletions
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