summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMouseEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXMouseEvent.c')
-rw-r--r--macosx/tkMacOSXMouseEvent.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index b43e51d..b49bc4b 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -54,7 +54,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.26 2007/04/13 14:51:18 dkf Exp $
+ * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.27 2007/04/21 19:06:38 hobbs Exp $
*/
#include "tkMacOSXInt.h"
@@ -234,8 +234,11 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr)
status = GetEventParameter(eventPtr->eventRef,
kEventParamMouseWheelDelta, typeLongInteger, NULL,
sizeof(long), NULL, &medPtr->delta);
- if (status != noErr) {
- ERR_MSG("Failed to retrieve mouse wheel delta, %d", (int) status);
+ if (status != noErr ) {
+#ifdef TK_MAC_DEBUG
+ fprintf (stderr,
+ "Failed to retrieve mouse wheel delta, %d\n", (int) status);
+#endif
statusPtr->err = 1;
return false;
} else {
@@ -530,22 +533,21 @@ GeneratePollingEvents(MouseEventData * medPtr)
*/
static void
-BringWindowForward(
- WindowRef wRef,
- Boolean isFrontProcess)
+BringWindowForward(WindowRef wRef, Boolean isFrontProcess)
{
if (!isFrontProcess) {
ProcessSerialNumber ourPsn = {0, kCurrentProcess};
OSStatus status = SetFrontProcess(&ourPsn);
if (status != noErr) {
- ERR_MSG("SetFrontProcess failed, %d", (int) status);
+#ifdef TK_MAC_DEBUG
+ fprintf(stderr,"SetFrontProcess failed, %d\n", (int) status);
+#endif
}
}
-
+
if (!TkpIsWindowFloating(wRef)) {
- if (IsValidWindowPtr(wRef)) {
+ if (IsValidWindowPtr(wRef))
SelectWindow(wRef);
- }
}
}