summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-11-30 01:02:55 (GMT)
committerhobbs <hobbs>2005-11-30 01:02:55 (GMT)
commit12e3724cff854097e33aacfde2f9d8ae89ad8b06 (patch)
tree890ac33201f8bc8ac2d2f6254f8c3912d6f86886 /macosx/tkMacOSXWindowEvent.c
parent0805428fc70c423c555452caba933228486c7c5d (diff)
downloadtk-12e3724cff854097e33aacfde2f9d8ae89ad8b06.zip
tk-12e3724cff854097e33aacfde2f9d8ae89ad8b06.tar.gz
tk-12e3724cff854097e33aacfde2f9d8ae89ad8b06.tar.bz2
* macosx/tkMacOSXXStubs.c (TkpOpenDisplay, TkMacOSXDisplayChanged):
* macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): * macosx/tkMacOSXWindowEvent.c (TkMacOSXProcessApplicationEvent): * macosx/tkMacOSXInt.h: Trap kEventAppAvailableWindowBoundsChanged event to watch for change in display size and adjust internal state appropriately.
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index a653b02..b6c039a 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -54,7 +54,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.3.2.5 2005/11/27 02:36:46 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.3.2.6 2005/11/30 01:02:55 hobbs Exp $
*/
#include "tkMacOSXInt.h"
@@ -106,12 +106,12 @@ TkMacOSXProcessApplicationEvent(
MacEventStatus *statusPtr)
{
Tcl_CmdInfo dummy;
-
- /*
+
+ /*
* This is a bit of a hack. We get "show" events both when we come back
- * from being hidden, and whenever we are activated. I only want to run the
- * "show" proc when we have been hidden already, not as a substitute for
- * <Activate>. So I use this toggle...
+ * from being hidden, and whenever we are activated. I only want to run
+ * the "show" proc when we have been hidden already, not as a substitute
+ * for <Activate>. So I use this toggle...
*/
static int toggleHide = 0;
@@ -129,10 +129,10 @@ TkMacOSXProcessApplicationEvent(
statusPtr->stopProcessing = 1;
break;
case kEventAppHidden:
- /*
- * Don't bother if we don't have an interp or
- * the show preferences procedure doesn't exist.
- */
+ /*
+ * Don't bother if we don't have an interp or
+ * the show preferences procedure doesn't exist.
+ */
toggleHide = 1;
if ((eventPtr->interp == NULL) ||
(Tcl_GetCommandInfo(eventPtr->interp,
@@ -154,6 +154,14 @@ TkMacOSXProcessApplicationEvent(
}
statusPtr->stopProcessing = 1;
break;
+ case kEventAppAvailableWindowBoundsChanged: {
+ TkDisplay *dispPtr = TkGetDisplayList();
+ TkMacOSXDisplayChanged(dispPtr->display);
+ /*
+ * Should we call ::tk::mac::OnDisplayChanged?
+ */
+ break;
+ }
default:
break;
}