emacs-devel
[Top][All Lists]
Advanced

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

Re: Killing a frame sometimes kills emacs


From: Tassilo Horn
Subject: Re: Killing a frame sometimes kills emacs
Date: Thu, 17 Nov 2011 14:45:03 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux)

Chong Yidong <address@hidden> writes:

>> I did that by using the patch below for about one month.  Since then,
>> the crashes I had are gone, and working with multiple emacs X frames
>> is fun again.  Should I go ahead and commit?
>
> Fine by me, but the code should probably be something like
>
> #ifdef USE_GTK
>     /* ... (Use C-style not C++ style comments) ... */
>     if (terminal->type != output_x_window)
> #endif
>     terminal->reference_count--;

So the one below is fine, right?  What about the indentation of the line
after the #endif?  Emacs' <tab> wants it to be correct in the USE_GTK
case, while you have it correct in the other case.

--8<---------------cut here---------------start------------->8---
=== modified file 'src/frame.c'
--- src/frame.c 2011-11-17 09:09:20 +0000
+++ src/frame.c 2011-11-17 13:40:27 +0000
@@ -1358,7 +1358,14 @@
 
     /* If needed, delete the terminal that this frame was on.
        (This must be done after the frame is killed.) */
-    terminal->reference_count--;
+
+#ifdef USE_GTK
+    /* FIXME: Deleting the terminal crashes emacs because of a GTK
+       bug.  See the thread starting with
+       <address@hidden> on emacs-devel.  */
+    if (terminal->type != output_x_window)
+#endif /* USE_GTK */
+      terminal->reference_count--;
     if (terminal->reference_count == 0)
       {
        Lisp_Object tmp;
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo
-- 
(What the world needs (I think) is not
      (a Lisp (with fewer parentheses))
      but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf



reply via email to

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