summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-06-14 16:19:56 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-06-14 16:19:56 (GMT)
commit1d82b1078322a72b9551982472e2e13f7a470ffd (patch)
treede1dfa92560f2aa08de1ee89fbf7f8d2a85f238a /generic
parent8dce88c3bfe67441ecf8b23a5f8ef9946485aa88 (diff)
downloadtk-1d82b1078322a72b9551982472e2e13f7a470ffd.zip
tk-1d82b1078322a72b9551982472e2e13f7a470ffd.tar.gz
tk-1d82b1078322a72b9551982472e2e13f7a470ffd.tar.bz2
Rework test bind-35.1 and simplify it a bit, make it fail in core-8-6-branch that does not have the fix yet.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTest.c78
1 files changed, 0 insertions, 78 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c
index 1f373ad..a8929b9 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -206,9 +206,6 @@ static int TrivialConfigObjCmd(ClientData dummy,
Tcl_Obj * const objv[]);
static void TrivialEventProc(ClientData clientData,
XEvent *eventPtr);
-static int TestgrabObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc,
- Tcl_Obj *const objv[]);
/*
*----------------------------------------------------------------------
@@ -284,9 +281,6 @@ Tktest_Init(
(ClientData) Tk_MainWindow(interp), NULL);
#endif /* _WIN32 */
- Tcl_CreateObjCommand(interp, "testgrab", TestgrabObjCmd,
- (ClientData) Tk_MainWindow(interp), NULL);
-
/*
* Create test image type.
*/
@@ -2084,78 +2078,6 @@ CustomOptionFree(
}
/*
- *----------------------------------------------------------------------
- *
- * TestgrabObjCmd --
- *
- * This function implements the "testgrab" command, which is used to test
- * grabbing of windows.
- *
- * testgrab grabbed $win: returns true if $win is currently grabbed
- * testgrab released $win: returns true if $win is currently not grabbed
- *
- * This function is useful when one wants to test for a grabbing window
- * at the moment it is called. [grab current] cannot be used for that
- * purpose because it returns the window dereferenced by eventualGrabWinPtr
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-TestgrabObjCmd(
- ClientData clientData, /* Main window for application. */
- Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument objects. */
-{
- static const char *const options[] = {"grabbed", "released", NULL};
- enum option {GRABBED, RELEASED};
- int index, res = 0;
- Tk_Window mainWin, tkwin;
-
- mainWin = (Tk_Window) clientData;
-
- if (objc < 3) {
- Tcl_WrongNumArgs(interp, 1, objv, "option window");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
- sizeof(char *), "command", 0, &index)!= TCL_OK) {
- return TCL_ERROR;
- }
-
- tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), mainWin);
- if (tkwin == NULL) {
- return TCL_ERROR;
- }
- /*printf("TestgrabObjCmd %s, grabWinPtr = %p , tkwin = %p\n", options[index],
- ((TkWindow *) tkwin)->dispPtr->grabWinPtr, tkwin);fflush(stdout);*/
-
- switch ((enum option) index) {
- case GRABBED:
- if (TkGrabState((TkWindow *) tkwin) != TK_GRAB_NONE) {
- res = 1;
- }
- break;
- case RELEASED:
- if (TkGrabState((TkWindow *) tkwin) == TK_GRAB_NONE) {
- res = 1;
- }
- break;
- }
-
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(res));
- return TCL_OK;
-}
-
-/*
* Local Variables:
* mode: c
* c-basic-offset: 4