Commit Graph

34 Commits

Author SHA1 Message Date
crs fee4095624 Reorganized source tree. Moved client.cpp into cmd/synergy as
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.
2002-07-30 16:52:46 +00:00
crs 9792d35a6b Replaced method name `run' with `mainLoop', and `stop' and `quit'
with `exitMainLoop' in most places.
2002-07-30 15:17:44 +00:00
crs 8913acac34 Added doxygen comments for all relevant headers in client and server. 2002-07-30 14:59:36 +00:00
crs 635c3d1c62 now cancelling and waiting for the accept client thread before
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.
2002-07-18 17:00:48 +00:00
crs 7c391a0f35 moved onError() method to IScreenReceiver from IPrimaryScreenReceiver.
also implemented onError in CClient which previously did not have
any way to handle display disconnection.
2002-07-16 16:52:26 +00:00
crs 4b46862026 checkpoint. refactored win32 code. had to edit and rename some
files so this is only a checkpoint.
2002-07-15 15:01:36 +00:00
crs f48a5fe387 checkpoint. still refactoring. merged common code from primary
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.
2002-07-13 22:00:38 +00:00
crs feeb15a08d applied refactoring to win32 code. 2002-07-11 13:13:37 +00:00
crs 3468f3d503 more refactoring. 2002-07-10 21:22:28 +00:00
crs f90076938b removed IPrimaryReceiver in favor of IServer, which required a few
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.
2002-07-10 14:15:17 +00:00
crs 64232c7854 updated to new automake and refactored server stuff. the server
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.
2002-07-09 21:22:31 +00:00
crs 1377882a9f fixed handling of jumping to primary when screen saver starts
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.
2002-06-23 23:24:22 +00:00
crs 504bfa2def checkpoint. adding screen saver support. only on X so far
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).
2002-06-22 19:20:21 +00:00
crs ede18cb7f3 cleaned up some minor bugs. 2002-06-21 17:55:47 +00:00
crs e2ee2371e0 some cleanup. also fixed a race condition when adding threads
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.
2002-06-21 15:18:01 +00:00
crs bebb63ac53 checkpoint. initial support for multiple displays on win32. 2002-06-19 17:03:29 +00:00
crs 62519b19fe indentation and other formatting changes. also cleaned up
#includes.
2002-06-10 22:06:45 +00:00
crs 7ca4804667 added command line option to choose the screen name. also now
using the hostname as the default name.  this is on both client
and server.
2002-06-09 17:59:32 +00:00
crs 555aa19eb2 added command line and configuration file arguments to choose
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.
2002-06-09 16:53:25 +00:00
crs 1cbdaee31b added better handling of X server disconnecting unexpectedly.
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.
2002-06-03 13:45:30 +00:00
crs fa4d24216f now limiting number of simultaneous HTTP requests being handled
at once.  this is to prevent denial of service.
2002-06-02 11:49:46 +00:00
crs d2135af0d9 fixes, mainly for windows. first, had to add a notification from
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.
2002-06-01 19:26:11 +00:00
crs 1ac62a9533 added mutex to all public methods that didn't already have it.
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.
2002-06-01 10:52:02 +00:00
crs 1e8a5d7fa9 fixed setConfig() to disconnect secondary screens that aren't
in the new configuration.
2002-05-31 18:09:43 +00:00
crs 67b149d3a4 checkpoint. changed CScreenMap to CConfig. must still change
CScreenMap.cpp to CConfig.cpp.
2002-05-31 14:43:23 +00:00
crs ed96354bad checkpoint. renamed CScreenMap.h to CConfig.h. will be
changing CScreenMap to CConfig everywhere.
2002-05-31 14:34:16 +00:00
crs 70f5f9491d added basic support for an embedded HTTP server. server
currently supports editing the screen map but changing
the map won't behave correctly if there are connected
screens.
2002-05-30 16:13:16 +00:00
crs 5fc87baa0f added screen locking support to win32. added support for
resolution changing (only semi-supported on X because that
has no means for resizing screen anyway).  also fixed some
clipboard problems on win32.
2002-05-24 17:54:28 +00:00
crs ea6b347b18 Indentation changes. 2002-04-29 14:40:01 +00:00
crs c5f6b34d85 checkpoint. changed protocol to better handle clipboards. now
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.
2002-04-29 13:31:44 +00:00
crs f9170eb139 Added support for multiple clipboards. This is mainly to
support both PRIMARY and CLIPBOARD selections on X windows.
2002-04-27 14:19:53 +00:00
crs f15c9df85b added platform independent clipboard transfer stuff
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
2001-11-25 18:32:41 +00:00
crs 3f6146b15f checkpoint. merging win32 code. server on X is currently broken
and client probably is.
2001-11-19 00:33:36 +00:00
crs 51505783aa moved client and server files into their own respective
directories.
2001-11-18 23:14:28 +00:00
Renamed from synergy/CServer.h (Browse further)