bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23462: [PATCH] Block input while minimizing on NS (bug#23462)


From: Alan Third
Subject: bug#23462: [PATCH] Block input while minimizing on NS (bug#23462)
Date: Thu, 12 May 2016 12:52:43 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

* src/nsterm.m (x_iconify_frame): Block input while miniaturize is
running.
---
 src/nsterm.m | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/nsterm.m b/src/nsterm.m
index 1d48c04..840c9c1 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1612,7 +1612,12 @@ static void hide_bell ()
       [[view window] orderOut: NSApp];
       [[view window] setFrame: t display: NO];
     }
+
+  /* Processing input while Emacs is being minimized can cause a
+     crash, so block it for the duration. */
+  block_input();
   [[view window] miniaturize: NSApp];
+  unblock_input();
 }
 
 /* Free X resources of frame F.  */
-- 

I've tried this on GNUStep as well and it doesn't break it any more
than it's already broken.

-- 
Alan Third





reply via email to

[Prev in Thread] Current Thread [Next in Thread]