Subject: bug#9893: closed (Re: bug#9893: gtk3, emacs 24 and gnome shell)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 30 Oct 2011 17:30:02 +0000

Your bug report

#9893: C-z suspends Emacs "forever" (gtk3, Gnome shell)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
9893: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9893
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#9893: gtk3, emacs 24 and gnome shell
From: Jan Djärv <[email-masked]>
To: Paul Eggert <[email-masked]>
Cc: [email-masked]
Date: Sun, 30 Oct 2011 18:26:49 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

28 okt 2011 kl. 00:42 skrev Paul Eggert:

> One more thing: the problem is not new to Emacs 24, as it
> occurs with the bundled Fedora 15 emacs ("GNU Emacs 23.2.1
> (x86_64-redhat-linux-gnu, GTK+ Version 2.24.4) of 2011-05-23
> on x86-12.phx2.fedoraproject.org").
> 
> There has been a bug report about this for Fedora since June
> <https://bugzilla.redhat.com/show_bug.cgi?id=711739>.
> 
> 

Emacs expects MapNotify to arrive when it is deiconfified.  But this doesn't seem to happen when we have iconfied us with gtk_window_iconfiy.  So we now check for _NET_WM_STATE_HIDDEN changes also.

But I don't really understand why Emacs does not process keypresses as normal when it is iconified or why Emacs even cares if it is iconfified or not.

	Jan D.

Subject: C-z suspends Emacs "forever" (gtk3, Gnome shell)
From: Paul Eggert <[email-masked]>
To: [email-masked]
Date: Thu, 27 Oct 2011 14:49:47 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

[This follows up a thread on emacs-devel:
<http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg00956.html>.]

I can reproduce the problem on my host (Fedora Core 15, x86-64),
starting with the trunk (bzr 106209), as follows:

  ./autogen.sh
  ./configure CFLAGS=-g --with-x-toolkit=gtk3
  make -j5
  cd src
  ./emacs -Q
  [ Type C-z into the new Emacs session. ]
  [ Use the Gnome shell Activities to bring Emacs back onto the screen. ]
  [ Emacs comes back onto the screen, but typing into it is ineffective. ]

Here's a backtrace of a frozen Emacs, which I started under GDB
(this is actually bootstrap-emacs):

(gdb) where
#0  0x0000003b8eed91f3 in select () from /lib64/libc.so.6
#1  0x0000000000537d5d in xg_select (max_fds=27, rfds=0x7fffffffce60, wfds=0x7fffffffcde0, efds=0x0, timeout=0x7fffffffcdc0) at xgselect.c:100
#2  0x0000000000659371 in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=12720546, wait_proc=0x0, just_wait_proc=0) at process.c:4607
#3  0x0000000000420934 in sit_for (timeout=120, reading=1, do_display=1) at dispnew.c:5971
#4  0x00000000005650e0 in read_char (commandflag=1, nmaps=2, maps=0x7fffffffd3b0, prev_event=12720546, used_mouse_menu=0x7fffffffd594, end_time=0x0) at keyboard.c:2687
#5  0x0000000000572d71 in read_key_sequence (keybuf=0x7fffffffd800, bufsize=30, prompt=12720546, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9290
#6  0x0000000000562862 in command_loop_1 () at keyboard.c:1447
#7  0x00000000005fe79b in internal_condition_case (bfun=0x56247d <command_loop_1>, handlers=12772738, hfun=0x561d65 <cmd_error>) at eval.c:1499
#8  0x000000000056216c in command_loop_2 (ignore=12720546) at keyboard.c:1158
#9  0x00000000005fe125 in internal_catch (tag=12768530, func=0x562146 <command_loop_2>, arg=12720546) at eval.c:1256
#10 0x000000000056211f in command_loop () at keyboard.c:1137
#11 0x00000000005618a9 in recursive_edit_1 () at keyboard.c:757
#12 0x0000000000561a4c in Frecursive_edit () at keyboard.c:821
#13 0x000000000055fb0c in main (argc=2, argv=0x7fffffffe118) at emacs.c:1706
(gdb) up
#1  0x0000000000537d5d in xg_select (max_fds=27, rfds=0x7fffffffce60, wfds=0x7fffffffcde0, efds=0x0, timeout=0x7fffffffcdc0) at xgselect.c:100
(gdb) p max_fds
$1 = 27
(gdb) p all_rfds
$2 = {
  fds_bits = {152895872, 0 <repeats 15 times>}
}
(gdb) p have_wfds
$3 = 1
(gdb) p all_wfds
$4 = {
  fds_bits = {0 <repeats 16 times>}
}
(gdb) p efds
$5 = (fd_set *) 0x0
(gdb) p tmop
$6 = (struct timeval *) 0x7fffffffcdc0
(gdb) p *tmop
$7 = {
  tv_sec = 0, 
  tv_usec = 431064
}