Commit Graph

102 Commits

Author SHA1 Message Date
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 52b60d5175 refactoring. refactored stuff in client (with changes to server
as necessary).
2002-07-12 20:41:23 +00:00
crs ef7fe1f283 checkpoint. making win32 and X primary screen code more similar
in order to share code later.
2002-07-11 18:58:49 +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 710e1bdd47 refactored client code. it now uses IClient and IServer and
has a CServerProxy, making it's design similar to the server
code.
2002-07-10 20:18:32 +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 bdfdc8e816 checkpoint. moved IPrimaryScreen.h. 2002-07-09 17:31:45 +00:00
crs 3138ba373d moved IServerProtocol to server from synergy directory. 2002-07-07 15:15:34 +00:00
crs 217313e013 fixed spurious mouse motions when entering/leaving primary
screen on X11.
2002-07-03 16:25:36 +00:00
crs d813329c0c mistakenly removed mouse button checks when on secondary screens
from isLockedToScreen() in earlier checkin.
2002-07-01 15:05:49 +00:00
crs a0eba4c337 disabled removing client if no heartbeat is received. we don't
want that while testing because it might hide bugs.
2002-07-01 13:01:16 +00:00
crs 684ac64742 fixed locking to screen on win32. was using GetKeyboardState()
to query keys but that doesn't give us up-to-date information.
now using GetAsyncKeyState() if on primary and m_keys if on
secondary.
2002-07-01 13:00:12 +00:00
crs ed8ed72f26 synergy hook DLL will now restart itself if a client tries to
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).
2002-06-26 16:31:48 +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 76db457830 win32 screen saver now handled. 2002-06-23 21:53:31 +00:00
crs a5391a0a1d checkpoint screensaver changes. now handling xscreensaver
dying and restarting or starting after synergy does.  also
now disabling the screen saver on the client.  next step:
win32 support.
2002-06-23 15:43:40 +00:00
crs 95a1ce8798 CXWindowsUtil::CErrorLock wasn't XSync()'ing the display before
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.
2002-06-22 19:47:27 +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 4e37691a9c added header files to _SOURCES. 2002-06-22 17:31:24 +00:00
crs 6c6afcc8cb added comments. 2002-06-22 13:55:45 +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 4f418e015e work around for bug with mouse driver on lombard powerbook. 2002-06-20 09:19:55 +00:00
crs a16e7217ce fixed bugs in mouse motion. wasn't taking care to capture all
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.
2002-06-19 20:24:35 +00:00
crs bebb63ac53 checkpoint. initial support for multiple displays on win32. 2002-06-19 17:03:29 +00:00
crs 29c90a3b6c fixed addition of X11 -L and -l options on link lines. 2002-06-19 14:45:22 +00:00
crs 9c7e863d77 checkpoint. more conversion to automake. 2002-06-19 11:23:49 +00:00
crs 1c604ecc3d started to convert to autoconf/automake. 2002-06-18 19:44:34 +00:00
crs 68740da942 made command line parsing a little more sane with respect to
windows NT services.
2002-06-17 15:44:45 +00:00
crs fe16546a1d formatting changes. 2002-06-17 13:31:21 +00:00
crs 57fb87ad10 refactored ISocket into IDataSocket. the latter and IListenSocket
now derive from ISocket.
2002-06-17 12:02:26 +00:00
crs e3dcf7febf performance fixes on win32 plus clean up of some warnings. also
improved error messages when uninstalling service.
2002-06-14 18:08:20 +00:00
crs 88490de5a2 fixed bug with switching screens on primary when there's no
link in that direction (it would assert).  introduced bug
when adding support for wrapping.  now ignores attempts to
move in a direction with no link.
2002-06-11 18:31:06 +00:00
crs 62519b19fe indentation and other formatting changes. also cleaned up
#includes.
2002-06-10 22:06:45 +00:00
crs 68940e58f3 win32 changes. now including windows.h with WIN32_LEAN_AND_MEAN
to avoid including some stuff we don't want (like winsock).
2002-06-10 16:49:46 +00:00
crs 172fc7e5b3 now allowing a screen to be its own neighbor to allow wrapping.
also no longer warping mouse to 0,0 when setting server screen
info.  that was causing the mouse to jump if the server screen
had itself as its left or top neighbor (directly or indirectly)
once a screen could be its own neighbor.
2002-06-10 10:08:36 +00:00
crs 2ea3d66112 fixed stripping of comments from configuration streams. 2002-06-10 09:49:21 +00:00
crs 2e931a4fd9 changed "permitted" to "supported" in error messages. 2002-06-10 09:49:03 +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 255e46017e fixed problem with setConfig(). if the new config didn't
include a screen that was already connected under an alias
then that screen wouldn't be disconnected and removed from
the screen list until the screen voluntarily disconnected.
at that time removeConnection() would assert because the
screen name would not be found.  now using the canonical
name in the protocol object as well as CServer.  this
allows setConfig() to always detect removed screens and
disconnect them.
2002-06-09 17:21:33 +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 8b2a282eb5 added aliases to configuration. an alias is another name for
a screen.  it's expected that the server will want to accept
a given client under several names (e.g. the hostname and the
FQDN).
2002-06-08 23:24:40 +00:00
crs 4b28ffc5b2 win32 changes. changed names of binaries. added support for
running as (and installing/installing) a service.  added
support for multiple desktops (NT only, 95 doesn't support
multiple desktops).
2002-06-08 21:48:00 +00:00
crs 5709d8ddef refactored some common platform dependent stuff into a new
library:  platform.  also removed test.cpp.
2002-06-04 12:26:23 +00:00
crs c3649df304 added command line parsing, restartability, and daemonizing to
client.  broke win32 stuff though.  also moved version and
copyright constants into a new file and renamed protocol
version constants.
2002-06-04 11:06:26 +00:00
crs beda89fd53 changes to add command line arguments. also added automatic
restarting and daemonizing on unix.  daemon sends log messages
to syslog.  unix now reads config file from file named on
command line;  if no command line arg then uses effective
user's config file and if that's not there it finally tries
/etc/synergy.conf.  if there are no screens configured then
one is added for the primary screen.  broke some startup
stuff on win32.

also now timing out if X primary screen can't grab the mouse
and keyboard.  the server will just give up trying to switch
screens.  the grabs will fail is some other app has a grab
and won't release it.  note that kdm grabs the keyboard for
the duration that the login window is displayed, effectively
disabling synergy.
2002-06-03 18:53:18 +00:00