diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-09 09:55:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-09 09:55:56 (GMT) |
commit | 9c82b94f7f8be2ebc6cf88f55d08d6e087cff5a5 (patch) | |
tree | 976f58bbb47262acff6f1ff2a3d3872665a22cc6 /macosx | |
parent | 19d012df44dac9aaf5faa9b3beca5a6396ea21a8 (diff) | |
download | tk-9c82b94f7f8be2ebc6cf88f55d08d6e087cff5a5.zip tk-9c82b94f7f8be2ebc6cf88f55d08d6e087cff5a5.tar.gz tk-9c82b94f7f8be2ebc6cf88f55d08d6e087cff5a5.tar.bz2 |
TIP #581: More progress
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXMenu.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 34 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.h | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 9ba7ce8..8005517 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -1165,12 +1165,12 @@ CheckForSpecialMenu( cascadeEntryPtr = cascadeEntryPtr->nextCascadePtr) { if (cascadeEntryPtr->menuPtr->menuType == MENUBAR && cascadeEntryPtr->menuPtr->masterMenuPtr->tkwin) { - TkMenu *masterMenuPtr = cascadeEntryPtr->menuPtr->masterMenuPtr; + TkMenu *mainMenuPtr = cascadeEntryPtr->menuPtr->masterMenuPtr; int i = 0; Tcl_DString ds; Tcl_DStringInit(&ds); - Tcl_DStringAppend(&ds, Tk_PathName(masterMenuPtr->tkwin), -1); + Tcl_DStringAppend(&ds, Tk_PathName(mainMenuPtr->tkwin), -1); while (specialMenus[i].name) { Tcl_DStringAppend(&ds, specialMenus[i].name, specialMenus[i].len); diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 3b843b9..6b7871f 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -674,7 +674,7 @@ TkWmNewWindow( wmPtr->reparent = None; wmPtr->titleUid = NULL; wmPtr->iconName = NULL; - wmPtr->master = NULL; + wmPtr->container = NULL; wmPtr->hints.flags = InputHint | StateHint; wmPtr->hints.input = True; wmPtr->hints.initial_state = NormalState; @@ -950,7 +950,7 @@ TkWmDeadWindow( if (containerPtr == winPtr) { wmPtr2 = winPtr2->wmInfoPtr; - wmPtr2->master = NULL; + wmPtr2->container = NULL; } } @@ -2353,7 +2353,7 @@ WmIconifyCmd( Tcl_SetErrorCode(interp, "TK", "WM", "ICONIFY", "OVERRIDE_REDIRECT", NULL); return TCL_ERROR; - } else if (wmPtr->master != NULL) { + } else if (wmPtr->container != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't iconify \"%s\": it is a transient", winPtr->pathName)); Tcl_SetErrorCode(interp, "TK", "WM", "ICONIFY", "TRANSIENT", NULL); @@ -3493,7 +3493,7 @@ WmStateCmd( "OVERRIDE_REDIRECT", NULL); return TCL_ERROR; } - if (wmPtr->master != NULL) { + if (wmPtr->container != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't iconify \"%s\": it is a transient", winPtr->pathName)); @@ -3620,9 +3620,9 @@ WmTransientCmd( return TCL_ERROR; } if (objc == 3) { - if (wmPtr->master != NULL) { + if (wmPtr->container != NULL) { Tcl_SetObjResult(interp, - Tcl_NewStringObj(Tk_PathName(wmPtr->master), -1)); + Tcl_NewStringObj(Tk_PathName(wmPtr->container), -1)); } return TCL_OK; } @@ -3665,7 +3665,7 @@ WmTransientCmd( } for (w = containerPtr; w != NULL && w->wmInfoPtr != NULL; - w = (TkWindow *)w->wmInfoPtr->master) { + w = (TkWindow *)w->wmInfoPtr->container) { if (w == winPtr) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "setting \"%s\" as master creates a transient/master cycle", @@ -3701,7 +3701,7 @@ WmTransientCmd( transient->flags |= WITHDRAWN_BY_CONTAINER; } - wmPtr->master = (Tk_Window)containerPtr; + wmPtr->container = (Tk_Window)containerPtr; } ApplyContainerOverrideChanges(winPtr, NULL); return TCL_OK; @@ -3734,15 +3734,15 @@ RemoveTransient( TkWindow *containerPtr; Transient *transPtr, *temp; - if (wmPtr == NULL || wmPtr->master == NULL) { + if (wmPtr == NULL || wmPtr->container == NULL) { return; } - containerPtr = (TkWindow *)wmPtr->master; + containerPtr = (TkWindow *)wmPtr->container; wmPtr2 = containerPtr->wmInfoPtr; if (wmPtr2 == NULL) { return; } - wmPtr->master= NULL; + wmPtr->container= NULL; transPtr = wmPtr2->transientPtr; while (transPtr != NULL) { if (transPtr->winPtr != winPtr) { @@ -5375,7 +5375,7 @@ TkGetTransientMaster( TkWindow *winPtr) { if (winPtr->wmInfoPtr != NULL) { - return (Tk_Window)winPtr->wmInfoPtr->master; + return (Tk_Window)winPtr->wmInfoPtr->container; } return NULL; } @@ -6647,7 +6647,7 @@ TkMacOSXApplyWindowAttributes( WmInfo *wmPtr = winPtr->wmInfoPtr; ApplyWindowAttributeFlagChanges(winPtr, macWindow, 0, 0, 0, 1); - if (wmPtr->master != NULL || winPtr->atts.override_redirect) { + if (wmPtr->container != NULL || winPtr->atts.override_redirect) { ApplyContainerOverrideChanges(winPtr, macWindow); } } @@ -6781,7 +6781,7 @@ ApplyWindowAttributeFlagChanges( */ if ((winPtr->atts.override_redirect) || - (wmPtr->master != NULL) || + (wmPtr->container != NULL) || (winPtr->wmInfoPtr->macClass == kHelpWindowClass)) { b |= (NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorFullScreenAuxiliary); @@ -6923,7 +6923,7 @@ ApplyContainerOverrideChanges( if (wmPtr->hints.initial_state == NormalState) { [macWindow orderFront:nil]; } - if (wmPtr->master != NULL) { + if (wmPtr->container != NULL) { wmPtr->flags |= WM_TOPMOST; } else { wmPtr->flags &= ~WM_TOPMOST; @@ -6939,8 +6939,8 @@ ApplyContainerOverrideChanges( [macWindow setExcludedFromWindowsMenu:NO]; wmPtr->flags &= ~WM_TOPMOST; } - if (wmPtr->master != None) { - TkWindow *containerWinPtr = (TkWindow *)wmPtr->master; + if (wmPtr->container != None) { + TkWindow *containerWinPtr = (TkWindow *)wmPtr->container; if (containerWinPtr && (containerWinPtr->window != None) && TkMacOSXHostToplevelExists(containerWinPtr)) { diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h index 6696b05..19bf379 100644 --- a/macosx/tkMacOSXWm.h +++ b/macosx/tkMacOSXWm.h @@ -66,7 +66,7 @@ typedef struct TkWmInfo { Tk_Uid titleUid; /* Title to display in window caption. If NULL, * use name of widget. */ char *iconName; /* Name to display in icon. */ - Tk_Window master; /* Container window for TRANSIENT_FOR property, + Tk_Window container; /* Container window for TRANSIENT_FOR property, * or None. */ XWMHints hints; /* Various pieces of information for window * manager. */ |