* xterm.c (x_dispatch_event): More accurate ifdefs.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Apr 2011 16:44:58 +0000 (09:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Apr 2011 16:44:58 +0000 (09:44 -0700)
src/ChangeLog
src/xterm.c
src/xterm.h

index cb3ef75..f3b7c18 100644 (file)
@@ -6,12 +6,10 @@
 
        * xterm.c: Fix problems found by static analysis with other toolkits.
        (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
-       (x_dispatch_event): Declare static only if !USE_GTK && USE_X_TOOLKIT.
-       Define if USE_GTK || (HAVE_MENUS && USE_X_TOOLKIT); USE_MOTIF need
-       not be part of this test.
+       (x_dispatch_event): Declare static if USE_GTK, and
+       define if USE_GTK || USE_X_TOOLKIT.
        (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
-       * xterm.h (x_dispatch_event): Use USE_GTK, not USE_MOTIF, when testing
-       whether to declare.
+       * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
        * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only if
        defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
 
index 74eff79..42aca33 100644 (file)
@@ -349,7 +349,7 @@ static void x_check_expected_move (struct frame *, int, int);
 static void x_sync_with_move (struct frame *, int, int, int);
 static int handle_one_xevent (struct x_display_info *, XEvent *,
                               int *, struct input_event *);
-#if !defined USE_GTK && defined USE_X_TOOLKIT
+#ifdef USE_GTK
 static int x_dispatch_event (XEvent *, Display *);
 #endif
 /* Don't declare this NO_RETURN because we want no
@@ -6977,7 +6977,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
   return count;
 }
 
-#if defined USE_GTK || (defined HAVE_MENUS && defined USE_X_TOOLKIT)
+#if defined USE_GTK || defined USE_X_TOOLKIT
 
 /* Handles the XEvent EVENT on display DISPLAY.
    This is used for event loops outside the normal event handling,
index 787dd41..fbd638f 100644 (file)
@@ -986,7 +986,7 @@ extern void x_clear_area (Display *, Window, int, int, int, int, int);
 extern void x_mouse_leave (struct x_display_info *);
 #endif
 
-#if defined USE_GTK || defined USE_X_TOOLKIT
+#ifdef USE_X_TOOLKIT
 extern int x_dispatch_event (XEvent *, Display *);
 #endif
 extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *,