diff options
author | das <das> | 2006-05-12 18:17:48 (GMT) |
---|---|---|
committer | das <das> | 2006-05-12 18:17:48 (GMT) |
commit | 0efe3aa4cd5dc9cb5481aebad65d74ce1556c765 (patch) | |
tree | cd23015b14a776e288d49f24dec1f6c29be75a35 /generic/tkCanvWind.c | |
parent | 72916f1f4a107097269b06bf79a7cc793d405ff7 (diff) | |
download | tk-0efe3aa4cd5dc9cb5481aebad65d74ce1556c765.zip tk-0efe3aa4cd5dc9cb5481aebad65d74ce1556c765.tar.gz tk-0efe3aa4cd5dc9cb5481aebad65d74ce1556c765.tar.bz2 |
* generic/tkCanvWind.c (DisplayWinItem, WinItemRequestProc): ensure
canvas window items are unmapped when canvas is unmapped. [Bug 940117]
* macosx/tkMacOSXSubwindows.c (TkMacOSXUpdateClipRgn): empty clip region
of unmapped windows to prevent any drawing into them or into their
children from becoming visible. [Bug 940117]
* macosx/tkMacOSXInt.h: revert Jim's attempt of 2005-03-14 to
* macosx/tkMacOSXSubwindows.c: fix Bug 940117 as it disables Map/Unmap
event propagation to children. [Bug 1480105]
* macosx/tkMacOSXDraw.c (TkPutImage): handle tkPictureIsOpen flag, fixes
incorrect positioning of images with complex alpha on native buttons;
actual alpha blending is still broken in this situation. [Bug 1155596]
* macosx/tkMacOSXEvent.c (TkMacOSXProcessCommandEvent):
* macosx/tkMacOSXMenus.c (TkMacOSXInitMenus): workaround carbon bug with
key shortcut for 'Preferences' app menu item. [Bug 1481503]
* macosx/tkMacOSXKeyEvent.c (TkMacOSXProcessKeyboardEvent): only check
for HICommand menu item shortcuts in the application menu.
* macosx/tkMacOSXInt.h: initialize keyboard layout setup in
* macosx/tkMacOSXInit.c: TkpInit() rather than during handling of
* macosx/tkMacOSXKeyEvent.c: first key down event.
* macosx/tkMacOSXDraw.c: add optional debug code to flash clip
* macosx/tkMacOSXSubwindows.c: regions during update or draw.
Diffstat (limited to 'generic/tkCanvWind.c')
-rw-r--r-- | generic/tkCanvWind.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 5950f32..752dc00 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvWind.c,v 1.12 2005/11/04 15:23:05 dkf Exp $ + * RCS: @(#) $Id: tkCanvWind.c,v 1.13 2006/05/12 18:17:48 das Exp $ */ #include <stdio.h> @@ -581,7 +581,12 @@ DisplayWinItem( if (state == TK_STATE_NULL) { state = ((TkCanvas *)canvas)->canvas_state; } - if (state == TK_STATE_HIDDEN) { + + /* + * A drawable of None is used by the canvas UnmapNotify handler + * to indicate that we should no longer display ourselves. + */ + if (state == TK_STATE_HIDDEN || drawable == None) { if (canvasTkwin == Tk_Parent(winItemPtr->tkwin)) { Tk_UnmapWindow(winItemPtr->tkwin); } else { @@ -1031,8 +1036,14 @@ WinItemRequestProc( WindowItem *winItemPtr = (WindowItem *) clientData; ComputeWindowBbox(winItemPtr->canvas, winItemPtr); + + /* + * A drawable argument of None to DisplayWinItem is used by the canvas + * UnmapNotify handler to indicate that we should no longer display + * ourselves, so need to pass a (bogus) non-zero drawable value here. + */ DisplayWinItem(winItemPtr->canvas, (Tk_Item *) winItemPtr, NULL, - (Drawable) None, 0, 0, 0, 0); + (Drawable) -1, 0, 0, 0, 0); } /* |