+
+static Lisp_Object
+queue_selection_requests_unwind (frame)
+ Lisp_Object frame;
+{
+ FRAME_PTR f = XFRAME (frame);
+
+ if (! NILP (frame))
+ x_stop_queuing_selection_requests (FRAME_X_DISPLAY (f));
+ return Qnil;
+}
+
+/* Return some frame whose display info is DPYINFO.
+ Return nil if there is none. */
+
+static Lisp_Object
+some_frame_on_display (dpyinfo)
+ struct x_display_info *dpyinfo;
+{
+ Lisp_Object list, frame;
+
+ FOR_EACH_FRAME (list, frame)
+ {
+ if (FRAME_X_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
+ return frame;
+ }
+
+ return Qnil;
+}