+2014-04-17 Jan Djärv <jan.h.d@swipnet.se>
+
+ * xterm.c (x_make_frame_visible): Prevent endless loop when frame
+ never becomes visible, i.e. using XMonad (Bug#17237).
+
2014-04-17 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (Fline_pixel_height): Don't assume that the current
x_make_frame_visible (struct frame *f)
{
int original_top, original_left;
+ int tries = 0;
block_input ();
/* Force processing of queued events. */
x_sync (f);
- /* This hack is still in use at least for Cygwin. See
+ /* If on another desktop, the deiconify/map may be ignored and the
+ frame never becomes visible. XMonad does this.
+ Prevent an endless loop. */
+ if (FRAME_ICONIFIED_P (f) && ++tries > 100)
+ break;
+
+ /* This hack is still in use at least for Cygwin. See
http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
Machines that do polling rather than SIGIO have been