summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2007-04-21 19:06:37 (GMT)
committerhobbs <hobbs>2007-04-21 19:06:37 (GMT)
commitfc87f3751a9393132d24550de1637785b4aac5e5 (patch)
tree67b15fa8aaeefba792a30cace3d1ecf46d134365 /macosx/tkMacOSXWindowEvent.c
parent85f6905c50918a0ff282d5897620c1768a2e326d (diff)
downloadtk-fc87f3751a9393132d24550de1637785b4aac5e5.zip
tk-fc87f3751a9393132d24550de1637785b4aac5e5.tar.gz
tk-fc87f3751a9393132d24550de1637785b4aac5e5.tar.bz2
* macosx/tkMacOSXBitmap.c, macosx/tkMacOSXButton.c:
* macosx/tkMacOSXCarbonEvents.c, macosx/tkMacOSXClipboard.c: * macosx/tkMacOSXCursor.c, macosx/tkMacOSXDialog.c: * macosx/tkMacOSXDraw.c, macosx/tkMacOSXEvent.c: * macosx/tkMacOSXFont.c, macosx/tkMacOSXInit.c, macosx/tkMacOSXInt.h: * macosx/tkMacOSXKeyEvent.c, macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMenubutton.c, macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXScale.c, macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: Revert of commits from 2007-04-13 which broke the OS X build.
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c62
1 files changed, 32 insertions, 30 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index a20ac8c..1c8901a 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.19 2007/04/13 14:51:18 dkf Exp $
+ * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.20 2007/04/21 19:06:38 hobbs Exp $
*/
#include "tkMacOSXInt.h"
@@ -203,37 +203,39 @@ TkMacOSXProcessWindowEvent(
sizeof(whichWindow), NULL,
&whichWindow);
if (status != noErr) {
- ERR_MSG("TkMacOSXHandleWindowEvent: Failed to retrieve window");
+#ifdef TK_MAC_DEBUG
+ fprintf ( stderr, "TkMacOSXHandleWindowEvent:Failed to retrieve window" );
+#endif
return 0;
}
-
+
window = TkMacOSXGetXWindow(whichWindow);
switch (eventPtr->eKind) {
- case kEventWindowActivated:
- eventFound |= GenerateActivateEvents(window, 1);
- eventFound |= TkMacOSXGenerateFocusEvent(window, 1);
- break;
- case kEventWindowDeactivated:
- eventFound |= GenerateActivateEvents(window, 0);
- eventFound |= TkMacOSXGenerateFocusEvent(window, 0);
- break;
- case kEventWindowUpdate:
- if (GenerateUpdateEvent(window)) {
- eventFound = true;
- }
- break;
- case kEventWindowExpanded: {
- TkDisplay *dispPtr = TkGetDisplayList();
- TkWindow *winPtr = (TkWindow *)
- Tk_IdToWindow(dispPtr->display, window);
-
- if (winPtr) {
- TkpWmSetState(winPtr, TkMacOSXIsWindowZoomed(winPtr) ?
- ZoomState : NormalState);
- }
- break;
- }
+ case kEventWindowActivated:
+ eventFound |= GenerateActivateEvents(window, 1);
+ eventFound |= TkMacOSXGenerateFocusEvent(window, 1);
+ break;
+ case kEventWindowDeactivated:
+ eventFound |= GenerateActivateEvents(window, 0);
+ eventFound |= TkMacOSXGenerateFocusEvent(window, 0);
+ break;
+ case kEventWindowUpdate:
+ if (GenerateUpdateEvent(window)) {
+ eventFound = true;
+ }
+ break;
+ case kEventWindowExpanded: {
+ TkDisplay *dispPtr;
+ TkWindow *winPtr;
+ dispPtr = TkGetDisplayList();
+ winPtr = (TkWindow *)Tk_IdToWindow(dispPtr->display, window);
+ if (winPtr) {
+ TkpWmSetState(winPtr, TkMacOSXIsWindowZoomed(winPtr) ?
+ ZoomState : NormalState);
+ }
+ break;
+ }
}
return 0;
}
@@ -243,10 +245,10 @@ TkMacOSXProcessWindowEvent(
*
* GenerateUpdateEvent --
*
- * Given a Macintosh window update event this function generates all the
- * Expose XEvents needed by Tk.
+ * Given a Macintosh window update event this function generates
+ * all the Expose XEvents needed by Tk.
*
- * Results:
+ * Results:
* True if event(s) are generated - false otherwise.
*
* Side effects: