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.
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.
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.
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.
the address and port to listen on or connect to. changed the
default port and put it in ProtocolTypes.h. the HTTP port is
now no longer opened unless the --http argument is supplied
or the config file includes it.
the apps still exit but they do it in a mostly controlled
manner. in particular, the server threads except the one
processing primary screen events will terminate gracefully.
this will be important should the server ever allow HTTP
clients to rewrite the configuration file.
note that X makes it effectively impossible to continue once
the X server disconnects. even if it didn't it would be
difficult for synergy to recover. users will have to add
synergy to the X display manager's startup script if they
expect the server to be restarted. alternatively, we could
add code to fork synergy at startup; the child would do
the normal work while the parent would simply wait for the
child to exit and restart it.
CServer to the primary screen when the configuration changes so it
can make necessary adjustments (the win32 primary screen must tell
the hook dll about the new jump zones).
changed includes of some std c++ library files to go through
our own include files. these wrap the include with stuff to
keep vc++ quiet when compiling at warning level 4, which is
what it does now. it also works around missing <istream> and
<ostream> on g++2.96.
added missing std:: where necessary. g++ doesn't really support
namespaces so it lets references without the namespace slip
through.
added workaround or fix. not sure if istringstream::str(string)
should reset eofbit. it does on g++ but does not on vc++.
added clear() after str() so it works either way.
added low-level keyboard hook to win32. if available (it's only
available on NT SP3 and up) it allows us to catch and handle
alt+tab, alt+esc, ctrl+esc, and windows key hot keys. i think
that leaves only ctrl+alt+del and accessibility functions
uncaught on those systems.
fixed two blown assertions. first, if user tried to switch to
a client that had connected but hadn't yet sent the first info
message it would assert on the zero size screen. second, if
the primary screen was handling a mouse motion on behalf of a
secondary screen when that secondary screen disconnected then
an assert would blow because the primary screen would call
onMouseMoveSecondary() but m_protocol on the active screen is
NULL because disconnecting the active secondary screen caused
the mouse to jump to the primary screen.
sending a sequence number with enter messages. screens use that
sequence number in clipboard grab and data messages. the server
uses the sequence number to order messages across clients. also
changed secondary screens to send clipboard updates on leaving
(or when grab occurs when not active) instead of on a query from
the server. primary effectively does the same. the query
message has been removed.
clipboard owner support (MS windows done, X windows partial)
added key transfer on ms windows
mutex fixes in CClient (had race conditions)
faster debug output in ms windows
changed temporary screen name to "secondary"
network fixes on ms windows (poll returned wrong result)
fixed transparent cursor on ms windows