]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/xterm.c (handle_one_xevent): Fix build warning on non-GTK builds.
authorPo Lu <luangruo@yahoo.com>
Thu, 7 Apr 2022 23:47:10 +0000 (07:47 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 7 Apr 2022 23:47:10 +0000 (07:47 +0800)
src/xterm.c

index d4a5e0ab3dc71bdd13981c50fb64df9de37ed90a..8c6068e654182887a50c393f530ccd6c847a6ad1 100644 (file)
@@ -16000,8 +16000,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
          case XI_Leave:
            {
              XILeaveEvent *leave = (XILeaveEvent *) xi_event;
-             struct xi_device_t *source;
 #ifdef USE_GTK
+             struct xi_device_t *source;
              XMotionEvent ev;
 
              ev.x = lrint (leave->event_x);
@@ -16011,7 +16011,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 #endif
 
              any = x_top_window_to_frame (dpyinfo, leave->event);
+
+#ifdef USE_GTK
              source = xi_device_from_id (dpyinfo, leave->sourceid);
+#endif
 
              /* This allows us to catch LeaveNotify events generated by
                 popup menu grabs.  FIXME: this is right when there is a