summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-06-02 06:45:54 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-06-02 06:45:54 (GMT)
commit7e224c0bcdec400cbdb89459313b1e4ea73bc896 (patch)
treef211251c32b74e5c98846a6833a11d92c7e2b6ba /generic
parent6694505c3ede36fbdf40007bf50495675a8d9455 (diff)
downloadtk-7e224c0bcdec400cbdb89459313b1e4ea73bc896.zip
tk-7e224c0bcdec400cbdb89459313b1e4ea73bc896.tar.gz
tk-7e224c0bcdec400cbdb89459313b1e4ea73bc896.tar.bz2
Warping with respect to the whole screen is now synchronous as well (it is no longer executed as an idle task). This allows to remove some further update/after commands in tests.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index ea1f721..a2f8532 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -717,7 +717,7 @@ static int NameToWindow(Tcl_Interp *interp, Tk_Window main,
Tcl_Obj *objPtr, Tk_Window *tkwinPtr);
static unsigned ParseEventDescription(Tcl_Interp *interp, const char **eventStringPtr,
TkPattern *patPtr, EventMask *eventMaskPtr);
-static void DoWarp(ClientData clientData);
+static void DoWarp(TkDisplay *dispPtr);
static PSList * GetLookupForEvent(LookupTables* lookupPtr, const Event *eventPtr,
Tcl_Obj *object, int onlyConsiderDetailedEvents);
static void ClearLookupTable(LookupTables *lookupTables, ClientData object);
@@ -4376,10 +4376,10 @@ HandleEventGenerate(
*/
if (!(dispPtr->flags & TK_DISPLAY_IN_WARP)) {
+ dispPtr->flags |= TK_DISPLAY_IN_WARP;
if (!dispPtr->warpWindow) {
- Tcl_DoWhenIdle(DoWarp, dispPtr);
+ DoWarp(dispPtr);
}
- dispPtr->flags |= TK_DISPLAY_IN_WARP;
}
}
@@ -4466,24 +4466,22 @@ NameToWindow(
*
* DoWarp --
*
- * Perform Warping of X pointer. Executed as an idle handler only.
+ * Perform warping of mouse pointer with respect to the whole screen.
*
* Results:
* None
*
* Side effects:
- * X Pointer will move to a new location.
+ * Mouse pointer moves to a new location.
*
*-------------------------------------------------------------------------
*/
static void
DoWarp(
- ClientData clientData)
+ TkDisplay *dispPtr)
{
- TkDisplay *dispPtr = clientData;
-
- assert(clientData);
+ assert(dispPtr);
/*
* A non-NULL warpWindow means warping with respect to this window.
@@ -5286,7 +5284,6 @@ TkpCancelWarp(
assert(dispPtr);
if (dispPtr->flags & TK_DISPLAY_IN_WARP) {
- Tcl_CancelIdleCall(DoWarp, dispPtr);
dispPtr->flags &= ~TK_DISPLAY_IN_WARP;
}
}