summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMouseEvent.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-04-13 14:51:17 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-04-13 14:51:17 (GMT)
commit57c91ad391ab148036a5c6e4f0fdee7381352a85 (patch)
treee9f3f498ec12ff4c5603356d84573c8242a537e0 /macosx/tkMacOSXMouseEvent.c
parent59b73712486121720aa582183db730964dc8c8a9 (diff)
downloadtk-57c91ad391ab148036a5c6e4f0fdee7381352a85.zip
tk-57c91ad391ab148036a5c6e4f0fdee7381352a85.tar.gz
tk-57c91ad391ab148036a5c6e4f0fdee7381352a85.tar.bz2
Reduce the #ifdef count a lot by adding debug-print macros
Diffstat (limited to 'macosx/tkMacOSXMouseEvent.c')
-rw-r--r--macosx/tkMacOSXMouseEvent.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index 0fc3473..b43e51d 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.25 2006/09/10 17:06:32 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.26 2007/04/13 14:51:18 dkf Exp $
*/
#include "tkMacOSXInt.h"
@@ -234,11 +234,8 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr)
status = GetEventParameter(eventPtr->eventRef,
kEventParamMouseWheelDelta, typeLongInteger, NULL,
sizeof(long), NULL, &medPtr->delta);
- if (status != noErr ) {
-#ifdef TK_MAC_DEBUG
- fprintf (stderr,
- "Failed to retrieve mouse wheel delta, %d\n", (int) status);
-#endif
+ if (status != noErr) {
+ ERR_MSG("Failed to retrieve mouse wheel delta, %d", (int) status);
statusPtr->err = 1;
return false;
} else {
@@ -533,21 +530,22 @@ 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) {
-#ifdef TK_MAC_DEBUG
- fprintf(stderr,"SetFrontProcess failed, %d\n", (int) status);
-#endif
+ ERR_MSG("SetFrontProcess failed, %d", (int) status);
}
}
-
+
if (!TkpIsWindowFloating(wRef)) {
- if (IsValidWindowPtr(wRef))
+ if (IsValidWindowPtr(wRef)) {
SelectWindow(wRef);
+ }
}
}