On Dec 3, 2007, at 11:28 PM, Jeremy Huddleston wrote:
Unless anyone has an objection, I'm going to spend some time going through, cleaning up header files, adding documentation where I think it's appropriate, and moving around code between files to clean up our layout. I'll probably kill off cr and fullscreen while I'm at it. I need to get a handle on the startup code and events system, and there is alot of cruft getting in the way of my understanding... hopefully by cleaning up some of this stuff, I can clear out dead code and streamline our event pipe a bit.
Ben, what were the main changes you needed to do to get events working right in the 1.4 server? I haven't really looked at the changes between the two versions, but I did notice that the X11Application.m darwinEvents.c in 1.2 won't work dropped into 1.4.
Overall, the theme is that 1.4 provides nicer, more abstract way of telling the X server you want to send an event -- so we should almost never be generating events by filling in the event fields ourselvs. Okay. Warning: I got yelled at after this first commit for doing both a whitespace cleanup and code changes in the same commit. Look at the changes to send_nsevent. Thu, 1 Mar 2007 09:45:19 +0000 (01:45 -0800) Rewrote parts of the Xquartz event-handling code (thanks daniels and whot!) It should still be considered a work in progress, but mouse events almost work. http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=39ecd6fff4f... There's one important change here -- search for "nullbyte". This is necessary to tell the other thread that it should check for events -- we don't use that fd for anything other than poking the other thread to wake it up. Fri, 2 Mar 2007 01:44:39 +0000 (17:44 -0800) Fixed pointer events in Xquartz -- Keyboard events work, but the keycodes are incorrect. http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=2dafc46e3d8... Refactoring: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=537dc5ecde4... Rewrite: (and made the nullbyte hack slightly less ugly) http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=fe7b8f42378... Moved some code: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=3206e922589... Last major rewrite: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=a05ffca8dd0... Sorry to be so verbose, but it was a real battle :/ Ben Byer CoreOS / BSD Technology Group, XDarwin maintainer