54
54
* software in accordance with the terms specified in this
57
* RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.3.2.6 2005/11/30 01:02:55 hobbs Exp $
57
* RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.3.2.15 2006/09/10 17:07:36 das Exp $
60
60
#include "tkMacOSXInt.h"
62
61
#include "tkMacOSXWm.h"
63
62
#include "tkMacOSXEvent.h"
64
63
#include "tkMacOSXDebug.h"
129
128
statusPtr->stopProcessing = 1;
131
130
case kEventAppHidden:
133
* Don't bother if we don't have an interp or
134
* the show preferences procedure doesn't exist.
137
if ((eventPtr->interp == NULL) ||
138
(Tcl_GetCommandInfo(eventPtr->interp,
139
"::tk::mac::OnHide", &dummy)) == 0) {
131
if (toggleHide == 0) {
133
if (eventPtr->interp && Tcl_GetCommandInfo(eventPtr->interp,
134
"::tk::mac::OnHide", &dummy)) {
135
Tcl_GlobalEval(eventPtr->interp, "::tk::mac::OnHide");
142
Tcl_GlobalEval(eventPtr->interp, "::tk::mac::OnHide");
143
138
statusPtr->stopProcessing = 1;
145
140
case kEventAppShown:
146
141
if (toggleHide == 1) {
148
if ((eventPtr->interp == NULL) ||
149
(Tcl_GetCommandInfo(eventPtr->interp,
150
"::tk::mac::OnShow", &dummy)) == 0) {
143
if (eventPtr->interp && Tcl_GetCommandInfo(eventPtr->interp,
144
"::tk::mac::OnShow", &dummy)) {
145
Tcl_GlobalEval(eventPtr->interp, "::tk::mac::OnShow");
153
Tcl_GlobalEval(eventPtr->interp, "::tk::mac::OnShow");
155
148
statusPtr->stopProcessing = 1;
185
178
*----------------------------------------------------------------------
189
182
TkMacOSXProcessWindowEvent(
190
183
TkMacOSXEvent * eventPtr,
191
184
MacEventStatus * statusPtr)
239
232
dispPtr = TkGetDisplayList();
240
233
winPtr = (TkWindow *)Tk_IdToWindow(dispPtr->display, window);
242
TkpWmSetState(winPtr, NormalState);
235
TkpWmSetState(winPtr, TkMacOSXIsWindowZoomed(winPtr) ?
236
ZoomState : NormalState);
469
* Don't send focus events to windows of class help or to
470
* windows with the kWindowNoActivatesAttribute.
472
if (((TkWindow *)tkwin)->wmInfoPtr->macClass == kHelpWindowClass ||
473
((TkWindow *)tkwin)->wmInfoPtr->attributes &
474
kWindowNoActivatesAttribute) {
475
479
* Generate FocusIn and FocusOut events. This event
476
480
* is only sent to the toplevel window.
617
621
* ConfigureNotify to set these values. On the Mac we know imediatly that
618
622
* this is what we want - so we just set them. However, we need to
619
623
* make sure the windows clipping region is marked invalid so the
620
* change is visable to the subwindow.
624
* change is visible to the subwindow.
622
626
winPtr->changes.x = x;
623
627
winPtr->changes.y = y;
624
628
winPtr->changes.width = width;
625
629
winPtr->changes.height = height;
626
TkMacOSXInvalClipRgns(winPtr);
630
TkMacOSXInvalClipRgns(tkwin);