From a6bdd56c5b098599942e4091ae7e2af2d4631b44 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Mon, 17 Nov 2003 19:03:42 +0000 Subject: merge XFree86 4.3.0.1 to -CURRENT --- src/Event.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'src/Event.c') diff --git a/src/Event.c b/src/Event.c index 47d1e43..fa08dd0 100644 --- a/src/Event.c +++ b/src/Event.c @@ -58,17 +58,12 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Event.c,v 3.10 2001/12/14 19:56:11 dawes Exp $ */ #include "IntrinsicI.h" #include "Shell.h" #include "StringDefs.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - typedef struct _XtEventRecExt { int type; XtPointer select_data[1]; /* actual dimension is [mask] */ @@ -269,7 +264,7 @@ AddEventHandler(widget, select_data, type, has_type_specifier, other, proc, XtListPosition position; { register XtEventRec *p, **pp; - EventMask oldMask, eventMask; + EventMask oldMask = 0, eventMask = 0; if (!has_type_specifier) { eventMask = *(EventMask*)select_data & ~NonMaskableMask; @@ -583,7 +578,7 @@ typedef struct _WWTable { WWPair pairs; /* bogus entries */ } *WWTable; -static Const WidgetRec WWfake; /* placeholder for deletions */ +static const WidgetRec WWfake; /* placeholder for deletions */ #define WWHASH(tab,win) ((win) & tab->mask) #define WWREHASHVAL(tab,win) ((((win) % tab->rehash) + 2) | 1) @@ -1239,7 +1234,7 @@ char * arg; return(FALSE); } -static EventMask Const masks[] = { +static EventMask const masks[] = { 0, /* Error, should never see */ 0, /* Reply, should never see */ KeyPressMask, /* KeyPress */ @@ -1314,11 +1309,12 @@ static Widget LookupSpringLoaded(grabList) XtGrabList gl; for (gl = grabList; gl != NULL; gl = gl->next) { - if (gl->spring_loaded) + if (gl->spring_loaded) { if (XtIsSensitive(gl->widget)) return gl->widget; else return NULL; + } if (gl->exclusive) break; } return NULL; @@ -1338,10 +1334,10 @@ static Boolean DispatchEvent(event, widget) if (nextEvent.type == LeaveNotify && event->xcrossing.window == nextEvent.xcrossing.window && nextEvent.xcrossing.mode == NotifyNormal && - (event->xcrossing.detail != NotifyInferior && - nextEvent.xcrossing.detail != NotifyInferior || - event->xcrossing.detail == NotifyInferior && - nextEvent.xcrossing.detail == NotifyInferior)) { + ((event->xcrossing.detail != NotifyInferior && + nextEvent.xcrossing.detail != NotifyInferior) || + (event->xcrossing.detail == NotifyInferior && + nextEvent.xcrossing.detail == NotifyInferior))) { /* skip the enter/leave pair */ XNextEvent(event->xcrossing.display, &nextEvent); return False; @@ -1432,8 +1428,6 @@ Boolean _XtDefaultDispatcher(event) EventMask mask = _XtConvertTypeToMask(event->type); Widget dspWidget; Boolean was_filtered = False; - extern Widget _XtFindRemapWidget(); - extern void _XtUngrabBadGrabs(); dspWidget = _XtFindRemapWidget(event, widget, mask, pdi); -- cgit v1.2.3