synergy.cpp and server.cpp into cmd/synergyd as synergyd.cpp.
Moved and renamed related files. Moved remaining source files
into lib/.... Modified and added makefiles as appropriate.
Result is that library files are under lib with each library
in its own directory and program files are under cmd with each
command in its own directory.
now speaks to the primary screen and secondary screens almost
everywhere the same way through an IClient interface; only
special primary screen calls are accessed through a different
interface, the CPrimaryClient interface. this simplifies the
server since it no longer needs to test whether the active screen
is the primary or a secondary in most cases.
the server no longer speaks directly to the primary screen; all
that goes through the CPrimaryClient, which often just forwards
the call. the primary screen no longer speaks directly to the
server either, again going through the CPrimaryClient via a
IPrimaryReceiver interface.
CServerProtocol classes have been replaced by CClientProxy
classes which are very similar. the name makes more sense
though.
installing and uninstalling the new error handler, causing
errors before the lock to be caught and errors during the lock
to not be caught. had to add Display* as argument to c'tor.
multiple times is *not* the same as calling XIfEvent() because the
former will re-encounter events that it didn't process previously.
to make things simple it now pulls events off the queue and saves
them if not processed for selection transfer and puts them back
afterwards.
when it wasn't necessary. (in particular, we were getting the
clipboard update time from the owner then emptying the clipboard,
so we didn't need to get the time. worse, most owners don't
support getting the time and we often timed out.)
also fixed a multithread bug using the X display. we were using
a CThread to send an event after a timeout while we were waiting
in XIfEvent(). this necessarily involved two threads calling
into Xlib at once, which is not allowed. now using polling to
do the timeout because Xlib doesn't have a function to get
events with a timeout.