diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index ca54f81..fafa6f8 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.16 2005/03/23 22:17:31 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.17 2005/04/07 20:14:24 mdejong Exp $ */ #include <Carbon/Carbon.h> @@ -79,7 +79,9 @@ static int ParseGeometry _ANSI_ARGS_((Tcl_Interp *interp, static void TopLevelEventProc _ANSI_ARGS_((ClientData clientData, XEvent *eventPtr)); static void TkWmStackorderToplevelWrapperMap _ANSI_ARGS_(( - TkWindow *winPtr, Tcl_HashTable *table)); + TkWindow *winPtr, + Display *display, + Tcl_HashTable *table)); static void TopLevelReqProc _ANSI_ARGS_((ClientData dummy, Tk_Window tkwin)); static void UpdateGeometryInfo _ANSI_ARGS_(( @@ -5622,8 +5624,9 @@ TkpChangeFocus(winPtr, force) *---------------------------------------------------------------------- */ static void -TkWmStackorderToplevelWrapperMap(winPtr, table) +TkWmStackorderToplevelWrapperMap(winPtr, display, table) TkWindow *winPtr; /* TkWindow to recurse on */ + Display *display; /* X display of parent window */ Tcl_HashTable *table; /* Maps mac window to TkWindow */ { TkWindow *childPtr; @@ -5631,7 +5634,7 @@ TkWmStackorderToplevelWrapperMap(winPtr, table) WindowRef macWindow; int newEntry; - if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr)) { + if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr) && (winPtr->display == display)) { macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)); hPtr = Tcl_CreateHashEntry(table, @@ -5641,7 +5644,7 @@ TkWmStackorderToplevelWrapperMap(winPtr, table) for (childPtr = winPtr->childList; childPtr != NULL; childPtr = childPtr->nextPtr) { - TkWmStackorderToplevelWrapperMap(childPtr, table); + TkWmStackorderToplevelWrapperMap(childPtr, display, table); } } @@ -5677,7 +5680,7 @@ TkWmStackorderToplevel(parentPtr) */ Tcl_InitHashTable(&table, TCL_ONE_WORD_KEYS); - TkWmStackorderToplevelWrapperMap(parentPtr, &table); + TkWmStackorderToplevelWrapperMap(parentPtr, parentPtr->display, &table); windows = (TkWindow **) ckalloc((table.numEntries+1) * sizeof(TkWindow *)); |