Skip to content

Commit

Permalink
merge trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
fvogelnew1 committed Mar 7, 2024
2 parents e4ab39f + e4b3ca3 commit 1dd8357
Show file tree
Hide file tree
Showing 21 changed files with 120 additions and 225 deletions.
27 changes: 6 additions & 21 deletions generic/tkBind.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ static int GetVirtualEvent(Tcl_Interp *interp, VirtualEventTable *vetPtr,
Tcl_Obj *virtName);
static Tk_Uid GetVirtualEventUid(Tcl_Interp *interp, char *virtString);
static int HandleEventGenerate(Tcl_Interp *interp, Tk_Window main,
int objc, Tcl_Obj *const objv[]);
Tcl_Size objc, Tcl_Obj *const objv[]);
static void InitVirtualEventTable(VirtualEventTable *vetPtr);
static PatSeq * MatchPatterns(TkDisplay *dispPtr, Tk_BindingTable bindPtr, PSList *psList,
PSList *psSuccList, unsigned patIndex, const Event *eventPtr,
Expand Down Expand Up @@ -2231,14 +2231,8 @@ Tk_BindEvent(
curEvent = bindPtr->eventInfo + eventPtr->type;

/*
* Ignore the event completely if it is an Enter, Leave, FocusIn, or
* FocusOut event with detail NotifyInferior. The reason for ignoring
* these events is that we don't want transitions between a window and its
* children to be visible to bindings on the parent: this would cause
* problems for mega-widgets, since the internal structure of a
* mega-widget isn't supposed to be visible to people watching the parent.
*
* Furthermore we have to compute current time, needed for "event generate".
* Compute current time needed for "event generate",
* and reset counters for Key and Button events.
*/

switch (eventPtr->type) {
Expand All @@ -2248,15 +2242,6 @@ Tk_BindEvent(
bindInfoPtr->lastCurrentTime = CurrentTimeInMilliSecs();
bindInfoPtr->lastEventTime = eventPtr->xcrossing.time;
}
if (eventPtr->xcrossing.detail == NotifyInferior) {
return;
}
break;
case FocusIn:
case FocusOut:
if (eventPtr->xfocus.detail == NotifyInferior) {
return;
}
break;
case KeyPress:
case KeyRelease: {
Expand Down Expand Up @@ -3896,7 +3881,7 @@ static int
HandleEventGenerate(
Tcl_Interp *interp, /* Interp for errors return and name lookup. */
Tk_Window mainWin, /* Main window associated with interp. */
int objc, /* Number of arguments. */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
union { XEvent general; XVirtualEvent virt; } event;
Expand All @@ -3916,7 +3901,7 @@ HandleEventGenerate(
unsigned count;
unsigned flags;
int number;
unsigned i;
Tcl_Size i;

static const char *const fieldStrings[] = {
"-when", "-above", "-borderwidth", "-button",
Expand Down Expand Up @@ -4026,7 +4011,7 @@ HandleEventGenerate(
warp = 0;
pos = TCL_QUEUE_TAIL;

for (i = 2; i < (unsigned) objc; i += 2) {
for (i = 2; i < objc; i += 2) {
Tcl_Obj *optionPtr, *valuePtr;
#if defined(_MSC_VER)
/* Work around MSVC compiler optimization bug, see [d93c8175fd]. */
Expand Down
8 changes: 4 additions & 4 deletions generic/tkBusy.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void BusyGeometryProc(void *clientData,
static void BusyCustodyProc(void *clientData,
Tk_Window tkwin);
static int ConfigureBusy(Tcl_Interp *interp, Busy *busyPtr,
int objc, Tcl_Obj *const objv[]);
Tcl_Size objc, Tcl_Obj *const objv[]);
static Busy * CreateBusy(Tcl_Interp *interp, Tk_Window tkRef);
static Tcl_FreeProc DestroyBusy;
static void DoConfigureNotify(Tk_FakeWin *winPtr);
Expand All @@ -53,7 +53,7 @@ static Busy * GetBusy(Tcl_Interp *interp,
Tcl_Obj *const windowObj);
static int HoldBusy(Tcl_HashTable *busyTablePtr,
Tcl_Interp *interp, Tcl_Obj *const windowObj,
int configObjc, Tcl_Obj *const configObjv[]);
Tcl_Size configObjc, Tcl_Obj *const configObjv[]);
static void MakeTransparentWindowExist(Tk_Window tkwin,
Window parent);
static inline Tk_Window NextChild(Tk_Window tkwin);
Expand Down Expand Up @@ -640,7 +640,7 @@ static int
ConfigureBusy(
Tcl_Interp *interp,
Busy *busyPtr,
int objc,
Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tk_Cursor oldCursor = busyPtr->cursor;
Expand Down Expand Up @@ -731,7 +731,7 @@ HoldBusy(
Tcl_HashTable *busyTablePtr,/* Busy hash table. */
Tcl_Interp *interp, /* Interpreter to report errors to. */
Tcl_Obj *const windowObj, /* Window name. */
int configObjc, /* Option pairs. */
Tcl_Size configObjc, /* Option pairs. */
Tcl_Obj *const configObjv[])
{
Tk_Window tkwin;
Expand Down
12 changes: 5 additions & 7 deletions generic/tkButton.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static const enum command map[][8] = {

static void ButtonCmdDeletedProc(void *clientData);
static int ButtonCreate(void *clientData,
Tcl_Interp *interp, int objc,
Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const objv[], int type);
static void ButtonEventProc(void *clientData,
XEvent *eventPtr);
Expand All @@ -533,11 +533,9 @@ static char * ButtonTextVarProc(void *clientData,
static char * ButtonVarProc(void *clientData,
Tcl_Interp *interp, const char *name1,
const char *name2, int flags);
static int ButtonWidgetObjCmd(void *clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static Tcl_ObjCmdProc ButtonWidgetObjCmd;
static int ConfigureButton(Tcl_Interp *interp, TkButton *butPtr,
int objc, Tcl_Obj *const objv[]);
Tcl_Size objc, Tcl_Obj *const objv[]);
static void DestroyButton(TkButton *butPtr);

/*
Expand Down Expand Up @@ -621,7 +619,7 @@ static int
ButtonCreate(
TCL_UNUSED(void *), /* NULL. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument values. */
int type) /* Type of button to create: TYPE_LABEL,
* TYPE_BUTTON, TYPE_CHECK_BUTTON, or
Expand Down Expand Up @@ -1029,7 +1027,7 @@ ConfigureButton(
Tcl_Interp *interp, /* Used for error reporting. */
TkButton *butPtr, /* Information about widget; may or may
* not already have values for some fields. */
int objc, /* Number of arguments. */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
Tk_SavedOptions savedOptions;
Expand Down
6 changes: 2 additions & 4 deletions generic/tkConsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ static int ConsoleHandle(void *instanceData, int direction,
void **handlePtr);
static int ConsoleInput(void *instanceData, char *buf, int toRead,
int *errorCode);
static int ConsoleObjCmd(void *clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
static Tcl_ObjCmdProc ConsoleObjCmd;
static int ConsoleOutput(void *instanceData, const char *buf,
int toWrite, int *errorCode);
static void ConsoleWatch(void *instanceData, int mask);
static void DeleteConsoleInterp(void *clientData);
static void InterpDeleteProc(void *clientData, Tcl_Interp *interp);
static int InterpreterObjCmd(void *clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
static Tcl_ObjCmdProc InterpreterObjCmd;

/*
* This structure describes the channel type structure for file based IO:
Expand Down
14 changes: 5 additions & 9 deletions generic/tkEntry.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static const char *const selElementNames[] = {
*/

static int ConfigureEntry(Tcl_Interp *interp, Entry *entryPtr,
int objc, Tcl_Obj *const objv[]);
Tcl_Size objc, Tcl_Obj *const objv[]);
static int DeleteChars(Entry *entryPtr, Tcl_Size index, Tcl_Size count);
static Tcl_FreeProc DestroyEntry;
static void DisplayEntry(void *clientData);
Expand Down Expand Up @@ -437,9 +437,7 @@ static int EntryValueChanged(Entry *entryPtr,
const char *newValue);
static void EntryVisibleRange(Entry *entryPtr,
double *firstPtr, double *lastPtr);
static int EntryWidgetObjCmd(void *clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static Tcl_ObjCmdProc EntryWidgetObjCmd;
static void EntryWorldChanged(void *instanceData);
static int GetEntryIndex(Tcl_Interp *interp, Entry *entryPtr,
Tcl_Obj *indexObj, Tcl_Size *indexPtr);
Expand All @@ -449,9 +447,7 @@ static int InsertChars(Entry *entryPtr, Tcl_Size index, const char *string);
* These forward declarations are the spinbox specific ones:
*/

static int SpinboxWidgetObjCmd(void *clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static Tcl_ObjCmdProc SpinboxWidgetObjCmd;
static int GetSpinboxElement(Spinbox *sbPtr, int x, int y);
static int SpinboxInvoke(Tcl_Interp *interp, Spinbox *sbPtr,
int element);
Expand Down Expand Up @@ -1113,7 +1109,7 @@ ConfigureEntry(
Tcl_Interp *interp, /* Used for error reporting. */
Entry *entryPtr, /* Information about widget; may or may not
* already have values for some fields. */
int objc, /* Number of valid entries in argv. */
Tcl_Size objc, /* Number of valid entries in argv. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_SavedOptions savedOptions;
Expand Down Expand Up @@ -1400,7 +1396,7 @@ ConfigureEntry(
}
snprintf(sbPtr->formatBuf, formatSpace, sbPtr->valueFormat, dvalue);

/*
/*
* No check for error return here as well, because any possible
* error will be trapped below when attempting tracing.
*/
Expand Down
12 changes: 5 additions & 7 deletions generic/tkFrame.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static const Tk_OptionSpec *const optionSpecs[] = {

static void ComputeFrameGeometry(Frame *framePtr);
static int ConfigureFrame(Tcl_Interp *interp, Frame *framePtr,
int objc, Tcl_Obj *const objv[]);
Tcl_Size objc, Tcl_Obj *const objv[]);
static Tcl_FreeProc DestroyFrame;
static void DestroyFramePartly(Frame *framePtr);
static void DisplayFrame(void *clientData);
Expand All @@ -347,9 +347,7 @@ static void FrameRequestProc(void *clientData,
Tk_Window tkwin);
static void FrameStructureProc(void *clientData,
XEvent *eventPtr);
static int FrameWidgetObjCmd(void *clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static Tcl_ObjCmdProc FrameWidgetObjCmd;
static void FrameWorldChanged(void *instanceData);
static void MapFrame(void *clientData);

Expand Down Expand Up @@ -717,8 +715,8 @@ FrameWidgetObjCmd(
};
Frame *framePtr = (Frame *)clientData;
int result = TCL_OK, index;
int c, i;
Tcl_Size length;
int c;
Tcl_Size i, length;
Tcl_Obj *objPtr;

if (objc < 2) {
Expand Down Expand Up @@ -925,7 +923,7 @@ ConfigureFrame(
Tcl_Interp *interp, /* Used for error reporting. */
Frame *framePtr, /* Information about widget; may or may not
* already have values for some fields. */
int objc, /* Number of valid entries in objv. */
Tcl_Size objc, /* Number of valid entries in objv. */
Tcl_Obj *const objv[]) /* Arguments. */
{
Tk_SavedOptions savedOptions;
Expand Down
Loading

0 comments on commit 1dd8357

Please sign in to comment.