run_hook (Qx_pre_popup_menu_hook);
+#ifdef HAVE_WINDOW_SYSTEM
/* Cancel the hourglass timer. Depending on how the show_menu_hook
is implemented, the hourglass window can either be mapped (or on
non-X systems, the hourglass cursor can be defined) either while
detect input immediately after a popup menu generated by Custom
is unmapped. */
cancel_hourglass ();
+#endif
/* Display them in a menu, but not if F is the initial frame that
doesn't have its hooks set (e.g., in a batch session), because