carroll@s.cs.uiuc.edu (05/21/89)
I'm at loss on this one. Setup: Hacking GNU-Emacs 18.52 to use multiple X-windows (which I call "screens", to differentiate from Emacs-windows). Problem: I've got it mostly working, but in trying to install defaults processing I've broken it. Currently, it stores command line/.Xdefaults specifications in a screen-defaults structure. This is passed to the screen-creator function to actually create a screen. This works fine for the two initial screens (an edit screen and the minibuff screen). However, after that Emacs fudges the X-connection numbers and sets up IO handlers to grab all the X-windows IO. When I try to create another screen, the screen-creator calls XLoadQueryFont() to set up a font for the new screen (which could have been changed since the intial creation). At this point everything locks up, and I get a bunch of messages of the form Xlib: sequence lost (0x1000a > 0x15c) in reply type 0x0! These seem to be X-events that are getting lost (e.g., they stop after a bit, and are afterwards generated by moving the cursor in/out of the screen). Emacs uses a procudure to read input (internal_socket_read()), and I have a trap for any event that's not one of the standard types, but it's not tripping. But if I core-dump it (by kill -6 <job number>), the core image claims that it's in internal_socket_read(). I strongly suspect that the problem is contention between internal_socket_read() and XLoadQueryFont() in trying to talk to the server. Request: Any hints at all would be appreciated. In particuar, can anyone give me some pointers to where to look for information on this sort of thing? I _don't_ want to spend the next 2 months reading the entire X-docs. Can I tap into the protocol exchange? What does QueryFont() say to the server, and what does it send in reply? What X-doc talks about this? Many thanks! Alan M. Carroll "And there you are carroll@s.cs.uiuc.edu Saying 'We have the Moon, so now the Stars...'" CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll