summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSubwindows.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-07-28 03:45:02 (GMT)
committerhobbs <hobbs>2005-07-28 03:45:02 (GMT)
commit3caf558162fc4f2bb92f2d65f72f9f6532f34298 (patch)
tree718892b4287a0fc7482f4f9ef2aea943be834d84 /macosx/tkMacOSXSubwindows.c
parent4acbabe60fcb27871141aa191ac778f523243c4b (diff)
downloadtk-3caf558162fc4f2bb92f2d65f72f9f6532f34298.zip
tk-3caf558162fc4f2bb92f2d65f72f9f6532f34298.tar.gz
tk-3caf558162fc4f2bb92f2d65f72f9f6532f34298.tar.bz2
* generic/tkInt.h: Swap TkUnsupported1Cmd for TkUnsupported1ObjCmd.
* generic/tkWindow.c: Ditto. (neil madden) * macosx/tkMacOSXInt.h: Added TkMacOSXWindowClass decl * macosx/tkMacOSXWm.c (TkMacOSXWinStyle) New function. (TkUnsupported1ObjCmd): New function, replaces the un-objectified version of the command, recognizes more classes and attributes. (TkMacOSXWindowClass): private function to return OS X class of a Tk window. * macosx/tkMacOSXSubwindows.c (XMapWindow, XUnmapWindow): recognize special show/hide functions for sheets
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r--macosx/tkMacOSXSubwindows.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index e7025b7..c889a38 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.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: tkMacOSXSubwindows.c,v 1.2.2.4 2005/03/12 00:49:28 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2.2.5 2005/07/28 03:45:03 hobbs Exp $
*/
#include "tkInt.h"
@@ -20,6 +20,7 @@
#include <Carbon/Carbon.h>
#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
+#include "tkMacOSXWm.h"
/*
* Temporary region that can be reused.
@@ -65,8 +66,7 @@ XDestroyWindow(
TkPointerDeadWindow(macWin->winPtr);
macWin->toplevel->referenceCount--;
-
-
+
if (Tk_IsTopLevel(macWin->winPtr)) {
WindowRef winRef;
/*
@@ -199,7 +199,18 @@ XMapWindow(
macWin->winPtr->flags |= TK_MAPPED;
if (Tk_IsTopLevel(macWin->winPtr)) {
if (!Tk_IsEmbedded(macWin->winPtr)) {
- ShowWindow(GetWindowFromPort(destPort));
+ /*
+ * XXX This should be ShowSheetWindow for kSheetWindowClass
+ * XXX windows that have a wmPtr->master parent set.
+ */
+ WindowRef wRef = GetWindowFromPort(destPort);
+ if ((TkMacOSXWindowClass(macWin->winPtr) == kSheetWindowClass)
+ && (macWin->winPtr->wmInfoPtr->master != None)) {
+ ShowSheetWindow(wRef,
+ GetWindowFromPort(TkMacOSXGetDrawablePort(macWin->winPtr->wmInfoPtr->master)));
+ } else {
+ ShowWindow(wRef);
+ }
}
/*
@@ -259,7 +270,17 @@ XUnmapWindow(
macWin->winPtr->flags &= ~TK_MAPPED;
if (Tk_IsTopLevel(macWin->winPtr)) {
if (!Tk_IsEmbedded(macWin->winPtr)) {
- HideWindow(GetWindowFromPort(destPort));
+ /*
+ * XXX This should be HideSheetWindow for kSheetWindowClass
+ * XXX windows that have a wmPtr->master parent set.
+ */
+ WindowRef wref = GetWindowFromPort(destPort);
+ if ((TkMacOSXWindowClass(macWin->winPtr) == kSheetWindowClass)
+ && (macWin->winPtr->wmInfoPtr->master != None)) {
+ HideSheetWindow(wref);
+ } else {
+ HideWindow(wref);
+ }
}
/*
@@ -269,7 +290,7 @@ XUnmapWindow(
event.xany.serial = display->request;
event.xany.send_event = False;
event.xany.display = display;
-
+
event.xunmap.type = UnmapNotify;
event.xunmap.window = window;
event.xunmap.event = window;