Commit Graph

85 Commits

Author SHA1 Message Date
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 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 df6748f669 removed some obsolete comments. 2002-07-10 14:29:50 +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 e267d1dc1c now synthesizing key release events for each pressed key when
the client screen is closed.  this fixes the bug where the
client's keyboard was left with some keys logically pressed
when the client died (e.g. using ctrl+c on the client program
from the server's keyboard would leave the ctrl key logically
pressed).
2002-07-01 13:03:16 +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 78d28fd6e5 fixed getSize() to be non-blocking in CInputPacketStream. 2002-06-26 13:31:06 +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 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 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 bebb63ac53 checkpoint. initial support for multiple displays on win32. 2002-06-19 17:03:29 +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 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 62519b19fe indentation and other formatting changes. also cleaned up
#includes.
2002-06-10 22:06:45 +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 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 3b872bb727 fixed timeout when getting selection -- forgot to set flag to
terminate event loop.
2002-06-04 11:02:33 +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
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 1e988b3839 make sleep shorter in poll/sleep getEvent() loops. 2002-06-02 21:35:20 +00:00
crs a541ebc557 removed poll/sleep code to improve performance. 2002-06-02 21:03:38 +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 793c968f00 server now rejects clients that are not in the configuration.
added a protocol message to indicate this.
2002-05-31 18:18:29 +00:00
crs 8cb0302665 updated win32 clipboard to match new model. 2002-05-27 18:55:51 +00:00
crs 189537b8b9 removed getEventMask() from primary screen. added a class to
CXWindowsUtil that installs/uninstalls an X error hander.
using that in primary screen, clipboard, and util to ensure
that certain errors don't kill the app.
2002-05-27 18:30:13 +00:00
crs f8eb775278 changed lesstif hack to only apply to the CLIPBOARD selection.
apprently the PRIMARY selection must follow the ICCCM protocol
correctly.
2002-05-27 17:05:34 +00:00
crs 56d7271bc1 added missing files from previous submit. 2002-05-27 16:51:07 +00:00
crs 854d2c7fbf checkpoint. changed clipboard model. the clipboard can only
be accessed now between open()/close().  ownership of the
clipboard is asserted via the empty() method.  this parallels
the win32 model (but the win32 code hasn't been updated yet).

refactored X11 clipboard code.  moved the bulk of it into
CXWindowsClipboard and moved some comment event handling into
CXWindowsScreen.  changed how requests are processed into a
hopefully easier to understand model.  added support for getting
clipboard from and sending clipboard to motif (or at least
lesstif) clients.  sending to lesstif required a hack to work
around an apparent bug in lesstif.
2002-05-27 16:22:59 +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 34c587e864 added support for locking to a screen when the sroll lock is
toggled on or when any key or button is pressed.  fully
implemented on X but stubbed out for now on win32.
2002-05-24 14:37:12 +00:00
crs 13eee14232 server no longer asserts when a client connects with a name that's
already in use by another client.  also added reporting of errors
from the server to clients so clients can report meaningful
messages to users.
2002-05-23 14:56:03 +00:00
crs 6611ea871e changed structs to classes. there should be no more structs now. 2002-05-23 14:04:35 +00:00
crs 8df02380e5 removed unnecessary call in screen class, added logging calls
in clipboard class, and added another cast in protocol util
to avoid warning on win32.
2002-05-22 17:08:37 +00:00
crs 570d85c842 Indentation change. 2002-05-02 11:44:21 +00:00
crs eb2a202834 Was trying to avoid sending clipboard if timestamp wasn't
changed but clipboard owners may not update that timestamp
when the selection is changed.  Disabled the timestamp check.
2002-05-01 16:30:20 +00:00
crs f052d126c0 Added more checks to avoid sending unchanged clipboard data.
Still takes too long to query the clipboard owner for info
(maybe 1/10th second) but not sure why or if that can be
improved.
2002-05-01 16:17:57 +00:00
crs f2e83e607d checkpoint. turned off nagle and send buffering. also
added test to skip clipboard conversion if a previous
conversion from that owner failed.
2002-05-01 15:31:47 +00:00
crs b279c80608 checkpoint. now sending toggle modifier state when entering
a screen.  this allows the secondary screen to set it's
modifier state to match the primary screen's state.  this is
not strictly necessary since each keystroke should adjust the
modifier state as needed to get the right result.
2002-04-30 17:48:11 +00:00
crs dc19570621 Fixes to get win32 client and server up to date. 2002-04-30 16:23:03 +00:00