aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2014-04-17 11:07:58 +0200
committerJan Djärv2014-04-17 11:07:58 +0200
commit53e46f3ad6c61d9c8398dd38de0277c8a7f2243b (patch)
tree0cecb850486b559bee9908226c55d9f3685ffad2 /src
parent8915b84286466c88ff1da95148d73e53464a5a89 (diff)
downloademacs-53e46f3ad6c61d9c8398dd38de0277c8a7f2243b.tar.gz
emacs-53e46f3ad6c61d9c8398dd38de0277c8a7f2243b.zip
Prevent endless loop in x_make_frame_visible.
* xterm.c (x_make_frame_visible): Prevent endless loop when frame never becomes visible, i.e. using XMonad . Fixes: debbugs:17237
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xterm.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 122b093f2a0..bb3b87cfcf6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12014-04-17 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
4 never becomes visible, i.e. using XMonad (Bug#17237).
5
12014-04-17 Eli Zaretskii <eliz@gnu.org> 62014-04-17 Eli Zaretskii <eliz@gnu.org>
2 7
3 * xdisp.c (Fline_pixel_height): Don't assume that the current 8 * xdisp.c (Fline_pixel_height): Don't assume that the current
diff --git a/src/xterm.c b/src/xterm.c
index ae16e589f62..ee8372fc656 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8899,6 +8899,7 @@ void
8899x_make_frame_visible (struct frame *f) 8899x_make_frame_visible (struct frame *f)
8900{ 8900{
8901 int original_top, original_left; 8901 int original_top, original_left;
8902 int tries = 0;
8902 8903
8903 block_input (); 8904 block_input ();
8904 8905
@@ -9006,7 +9007,13 @@ x_make_frame_visible (struct frame *f)
9006 /* Force processing of queued events. */ 9007 /* Force processing of queued events. */
9007 x_sync (f); 9008 x_sync (f);
9008 9009
9009 /* This hack is still in use at least for Cygwin. See 9010 /* If on another desktop, the deiconify/map may be ignored and the
9011 frame never becomes visible. XMonad does this.
9012 Prevent an endless loop. */
9013 if (FRAME_ICONIFIED_P (f) && ++tries > 100)
9014 break;
9015
9016 /* This hack is still in use at least for Cygwin. See
9010 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html. 9017 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
9011 9018
9012 Machines that do polling rather than SIGIO have been 9019 Machines that do polling rather than SIGIO have been