summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index f4936eb..f5d8f59 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.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: tkWinWm.c,v 1.54.2.19 2005/03/08 21:53:13 hobbs Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.54.2.20 2005/06/01 00:07:30 mdejong Exp $
*/
#include "tkWinInt.h"
@@ -424,6 +424,7 @@ static void RefreshColormap _ANSI_ARGS_((Colormap colormap,
static void SetLimits _ANSI_ARGS_((HWND hwnd, MINMAXINFO *info));
static void TkWmStackorderToplevelWrapperMap _ANSI_ARGS_((
TkWindow *winPtr,
+ Display *display,
Tcl_HashTable *table));
static LRESULT CALLBACK TopLevelProc _ANSI_ARGS_((HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam));
@@ -6158,8 +6159,9 @@ BOOL CALLBACK TkWmStackorderToplevelEnumProc(hwnd, lParam)
*/
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; /* Table to maps HWND to TkWindow */
{
TkWindow *childPtr;
@@ -6168,7 +6170,7 @@ TkWmStackorderToplevelWrapperMap(winPtr, table)
int newEntry;
if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr) &&
- !Tk_IsEmbedded(winPtr)) {
+ !Tk_IsEmbedded(winPtr) && (winPtr->display == display)) {
wrapper = TkWinGetWrapperWindow((Tk_Window) winPtr);
/*fprintf(stderr, "Mapped HWND %d to %x (%s)\n", wrapper,
@@ -6181,7 +6183,7 @@ TkWmStackorderToplevelWrapperMap(winPtr, table)
for (childPtr = winPtr->childList; childPtr != NULL;
childPtr = childPtr->nextPtr) {
- TkWmStackorderToplevelWrapperMap(childPtr, table);
+ TkWmStackorderToplevelWrapperMap(childPtr, display, table);
}
}
/*
@@ -6216,7 +6218,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 *));