X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/07bf635fc3142206f15500d33024886c4339e522..e515b0a97ec150d54996700f9d6fffae5d1420f1:/lwlib/dispatch.c diff --git a/lwlib/dispatch.c b/lwlib/dispatch.c index 428512bc3d..5c554d67fd 100644 --- a/lwlib/dispatch.c +++ b/lwlib/dispatch.c @@ -15,7 +15,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ /* * The function XtWidgetToDispatchTo(), given an XEvent, returns the @@ -30,21 +31,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include "dispatch.h" -#ifdef THIS_IS_X11R4 +#include +#include +#include -#ifdef THIS_IS_X11R5 -ERROR!! only one of THIS_IS_X11R4 or THIS_IS_X11R5 must be defined. +#ifdef XlibSpecificationRelease +#if XlibSpecificationRelease >= 5 +#define HAVE_X11R5 #endif - -#else /* ! THIS_IS_X11R4 */ - -#ifndef THIS_IS_X11R5 -ERROR!! one of THIS_IS_X11R4 or THIS_IS_X11R5 must be defined. #endif -#endif /* ! THIS_IS_X11R4 */ - - /* ## All of the code on this page was copied from the X11R5 lib/Xt/Event.c, ## but is compatible with X11R4; the code in Event.c is different, but ## functionally equivalent for our purposes. @@ -114,7 +110,7 @@ static EventMask Const masks[] = { NonMaskableMask /* MappingNotify */ }; -#ifdef THIS_IS_X11R4 +#ifndef HAVE_X11R5 static /* in R5, this is not static, so we don't need to define it at all */ EventMask _XtConvertTypeToMask (eventType) @@ -127,7 +123,7 @@ EventMask _XtConvertTypeToMask (eventType) return 0; } -#endif /* R4 */ +#endif /* not HAVE_X11R5 */ /* -- _XtOnGrabList() omitted -- */ @@ -174,7 +170,7 @@ static Boolean WouldDispatchEvent(event, widget, mask, pd) for (p=widget->core.event_table; p != NULL; p = p->next) if ((mask & p->mask) != 0 -#ifdef THIS_IS_X11R4 +#ifndef HAVE_X11R5 || (mask == 0 && p->non_filter) #endif )