diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkEvent.c | 6 | ||||
-rw-r--r-- | generic/tkMain.c | 5 | ||||
-rw-r--r-- | generic/tkTextTag.c | 34 | ||||
-rw-r--r-- | generic/ttk/ttkLabel.c | 4 |
4 files changed, 26 insertions, 23 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 7dd2813..463379a 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -337,7 +337,7 @@ CreateXIC( preedit_attlist = XVaCreateNestedList(0, XNSpotLocation, &spot, XNFontSet, dispPtr->inputXfs, - (void *) NULL); + NULL); } winPtr->inputContext = XCreateIC(dispPtr->inputMethod, @@ -345,7 +345,7 @@ CreateXIC( XNClientWindow, winPtr->window, XNFocusWindow, winPtr->window, preedit_attname, preedit_attlist, - (void *) NULL); + NULL); if (preedit_attlist) { XFree(preedit_attlist); @@ -360,7 +360,7 @@ CreateXIC( /* * Adjust the window's event mask if the IM requires it. */ - XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, (void *) NULL); + XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, NULL); if ((winPtr->atts.event_mask & im_event_mask) != im_event_mask) { winPtr->atts.event_mask |= im_event_mask; XSelectInput(winPtr->display, winPtr->window, winPtr->atts.event_mask); diff --git a/generic/tkMain.c b/generic/tkMain.c index fddad3a..706f444 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -29,11 +29,6 @@ # endif #endif -#ifndef _WIN64 -/* See [Bug 2935503]: file mtime sets wrong time */ -# define _USE_32BIT_TIME_T -#endif - #include "tkInt.h" #include <ctype.h> #include <stdio.h> diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index fb514bf..beb7eb5 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -100,7 +100,7 @@ static TkTextTag * FindTag(Tcl_Interp *interp, TkText *textPtr, Tcl_Obj *tagName); static void SortTags(int numTags, TkTextTag **tagArrayPtr); static int TagSortProc(const void *first, const void *second); -static void TagBindEvent(TkText *textPtr, XEvent *eventPtr, +static void TagBindEvent(TkText *textPtr, XEvent *eventPtr, int numTags, TkTextTag **tagArrayPtr); /* @@ -213,7 +213,7 @@ TkTextTagCmd( if (tagPtr == textPtr->selTagPtr) { /* - * Send an event that the selection changed. This is + * Send an event that the selection changed. This is * equivalent to: * event generate $textWidget <<Selection>> */ @@ -457,6 +457,14 @@ TkTextTagCmd( &tagPtr->elide) != TCL_OK) { return TCL_ERROR; } + + /* + * Indices are potentially obsolete after changing -elide, + * especially those computed with "display" or "any" + * submodifier, therefore increase the epoch. + */ + + textPtr->sharedTextPtr->stateEpoch++; } /* @@ -947,15 +955,15 @@ TkTextCreateTag( const char *name; if (!strcmp(tagName, "sel")) { - if (textPtr->selTagPtr != NULL) { + if (textPtr->selTagPtr != NULL) { if (newTag != NULL) { - *newTag = 0; + *newTag = 0; } - return textPtr->selTagPtr; - } + return textPtr->selTagPtr; + } if (newTag != NULL) { *newTag = 1; - } + } name = "sel"; } else { hPtr = Tcl_CreateHashEntry(&textPtr->sharedTextPtr->tagTable, @@ -1054,7 +1062,7 @@ FindTag( * NULL, then don't record an error * message. */ TkText *textPtr, /* Widget in which tag is being used. */ - Tcl_Obj *tagName) /* Name of desired tag. */ + Tcl_Obj *tagName) /* Name of desired tag. */ { Tcl_HashEntry *hPtr; int len; @@ -1062,7 +1070,7 @@ FindTag( str = Tcl_GetStringFromObj(tagName, &len); if (len == 3 && !strcmp(str, "sel")) { - return textPtr->selTagPtr; + return textPtr->selTagPtr; } hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->tagTable, Tcl_GetString(tagName)); @@ -1394,7 +1402,7 @@ TkTextBindProc( XEvent *eventPtr) /* Pointer to X event that just happened. */ { TkText *textPtr = clientData; - int repick = 0; + int repick = 0; # define AnyButtonMask \ (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask) @@ -1438,7 +1446,7 @@ TkTextBindProc( } } else if ((eventPtr->type == EnterNotify) || (eventPtr->type == LeaveNotify)) { - if (eventPtr->xcrossing.state & AnyButtonMask) { + if (eventPtr->xcrossing.state & AnyButtonMask) { textPtr->flags |= BUTTON_DOWN; } else { textPtr->flags &= ~BUTTON_DOWN; @@ -1446,7 +1454,7 @@ TkTextBindProc( TkTextPickCurrent(textPtr, eventPtr); goto done; } else if (eventPtr->type == MotionNotify) { - if (eventPtr->xmotion.state & AnyButtonMask) { + if (eventPtr->xmotion.state & AnyButtonMask) { textPtr->flags |= BUTTON_DOWN; } else { textPtr->flags &= ~BUTTON_DOWN; @@ -1570,7 +1578,7 @@ TkTextPickCurrent( = eventPtr->xmotion.same_screen; textPtr->pickEvent.xcrossing.focus = False; textPtr->pickEvent.xcrossing.state = eventPtr->xmotion.state; - } else { + } else { textPtr->pickEvent = *eventPtr; } } diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 17433dc..5102baf 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -351,9 +351,9 @@ static void ImageDraw( if (state & TTK_STATE_DISABLED) { if (TtkSelectImage(image->imageSpec, 0ul) == image->tkimg) { - #ifndef MAC_OSX_TK +#ifndef MAC_OSX_TK StippleOver(image, tkwin, d, b.x,b.y); - #endif +#endif } } } |