* src/xterm.c (x_delete_display): Free XI2 device data here
instead, since it doesn't involve contacting the X server any
more.
(x_delete_terminal): Stop freeing XI2 device data.
xfree (dpyinfo->x_dnd_atoms);
xfree (dpyinfo->color_cells);
xfree (dpyinfo);
+
+#ifdef HAVE_XINPUT2
+ if (dpyinfo->supports_xi2)
+ x_free_xi_devices (dpyinfo);
+#endif
}
#ifdef USE_X_TOOLKIT
if (dpyinfo->xkb_desc)
XkbFreeKeyboard (dpyinfo->xkb_desc, XkbAllComponentsMask, True);
#endif
-#ifdef HAVE_XINPUT2
- if (dpyinfo->supports_xi2)
- x_free_xi_devices (dpyinfo);
-#endif
#ifdef USE_GTK
xg_display_close (dpyinfo->display);
#else