that uses poll() to process events more efficiently. it won't
wake up nor sleep any more than necessary, unlike the platform
independent implementation that polls and sleeps.
the main change is that WM_QUIT now causes the thread to be
cancelled instead of mainLoop() just returning. this also
requires runDaemon() to call the run function in a new thread
each time it calls it because it could can cancelled.
restart if the X server connection was lost; since synergy
is likely to be started by xdm or the user's xsession, it's
better for synergy to simply terminate when the connection
is lost. synergy will still restart due to other errors.
also fixed numerous other minor bugs and cleaned some stuff
up (like app error codes are now consistent and enumerated
in Version.h, for lack of a better place). and boosted
version and protocol numbers.
known to the caller. if the client supports more formats than
the server then the server could get a clipboard format greater
than kNumFormats. with this change the server discards the
extra formats instead of crashing.
if they cannot be used on an X server using authentication
because the daemons they start are not authorized to connect to
the X server. X users should modify Xsetup or Xsession.
call cleanup(). if that process still appears to exist then the
init() fails. otherwise some cleanup is performed and the init()
proceeds. a synergy server started while another is running will
now exit immediately without interfering the original server.
cancelling any other threads. this prevents a race condition
where we disconnect a client but it reconnects before we
manage to shutdown. that might leave a thread running and
the connection won't be closed down properly.
MsgWaitForMultipleObjects(): it will not return immediately
if an event already in the queue when it's called was already
in the queue during the last call to GetMessage()/PeekMessage().
also now discarding screen saver events if there are any other
screen saver events in the queue already. this prevents these
events from piling up in the queue, which they'd do because we
sleep for 250ms when handling each one.
work but will let testers make the final call. also fixed
desktop synchronization by setting a variable that was
mistakenly left unset. and tried to work around an apparent
bug in MsgWaitForMultipleObjects() that prevented the service
from closing down properly. start/pause/continue/stop
sequence still doesn't shut down correctly. start/pause/stop
and start/stop work fine.
screens into CPrimaryScreen and merged common code from secondary
screens into CSecondaryScreen. changed is-a relationship to a
has-a between the primary and secondary screen classes and the
generic platform dependent screen class to avoid multiple
inheritance of implementation. also standardized the interface
for those generic screen classes. adding a platform now involves
implementing simpler interfaces: IScreen for the generic screen,
IScreenEventHandler and some methods of CPrimaryScreen for the
primary screen, and IScreenEventHandler and some methods of
CSecondaryScreen for the secondary screen. did X11 platform
but not win32 platform.