all use format() the same way. also changed format() to actually
do formatting. however, it doesn't try looking up formatting
strings by id, it just uses the fallback format string.
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.
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.
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.
minor changes to support IPrimaryReciever's functionality. this
does mean that the IPrimaryScreen class will be calling some
methods with dummy arguments. those are documented in
CPrimaryClient.
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.
init() it while it's already running. fixed an uninitialized
pointer bug in CServer and some cleanup-on-error code in
CMSWindowsPrimaryScreen. also added timeout to read() on
IInputStream and a heartbeat sent by clients so the server
can disconnect clients that are dead but never reset the TCP
connection. previously the server would keep these dead
clients around forever and if the user was locked on the
client screen for some reason then the server would have to
be rebooted (or the server would have to be killed via a
remote login).
and back to secondary when it stops. also now redirecting
keyboard input to root window when screen saver starts; this
allows the user to type in the lock dialog and also effectively
discards any input used to deactivate the screen saver.
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.
and untested. also some known problems: not detecting an
xscreensaver started after us and not detecting built-in
screen saver activation (not sure if we can without using
ugly extensions).
to the thread list: the child thread would add itself to the
list which means there could be a time interval in the parent
where the child thread exists but isn't on the list. the
parent now does the adding and removing.
motion events relative to the previous mouse position. for
example, if two mouse events arrive, the first at x+1,y and
the second at x+2,y, we used to compute deltas of 1,0 and 2,0
instead of 1,0 and 1,0. that's fixed. also worked around a
bug (probably) in windows that caused a motion event after a
SetCursorPos() to be lost or reported one pixel off from the
correct position. now using mouse_event() which doesn't
have that problem. also fixed calculation of normalized
coordinates for mouse_event() when there are multiple
displays.