Commit Graph

67 Commits

Author SHA1 Message Date
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
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 1d3807cb0e added SIGINT and SIGTERM handling to unix client and server.
either signal causes the main thread to be cancelled.  added
necessary code to make main thread cancellation clean up
nicely.
2002-06-02 18:49:35 +00:00
crs 1da9be88c9 added a maximum request size to CHTTPProtocol so we can bail
on clients that cause us to use too much memory.  also put
methods in CHTTPRequest to get/set headers and changed the
data structure used to store them.  fixed a couple of other
miscellaneous bugs in CHTTPProtocol.cpp.
2002-06-02 13:34:35 +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 3a80df28dd changed iterator to use iterator_traits directly instead of
std::iterator to support the old STL on grace.
2002-05-31 18:35:53 +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 1e8a5d7fa9 fixed setConfig() to disconnect secondary screens that aren't
in the new configuration.
2002-05-31 18:09:43 +00:00
crs 71c374b6cd made isScreen() a const method. 2002-05-31 18:08:08 +00:00
crs 942e57fc8d added I/O for configuration files and changed the server to use
an external file for its configuration (was hard coding a config
for testing).
2002-05-31 17:32:26 +00:00
crs 0eccd52226 finished renaming CScreenMap to CConfig. 2002-05-31 14:44:54 +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 536eb52337 added methods to CLog for getting the outputter, getting and
setting the priority filter, and added code for thread safety.
added code to apps to enable thread safety in CLog.
2002-05-31 14:25:26 +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 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 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 e277e6e74a added support for mouse wheel on win32. 2002-05-23 18:35:08 +00:00
crs 24f5b66cf3 added support for mouse wheel on X. 2002-05-23 15:50:38 +00:00
crs 4542bb9e40 added a third screen to hard coded map for testing purposes. 2002-05-23 15:00:39 +00:00
crs 9ce7a2757a fixed log message. 2002-05-23 15:00:13 +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 9e161163b0 now letting some key events filter through. this allows the
keyboard lights to track toggle changes.  however, it also
seems to let through keyboard events that shouldn't get
through.
2002-05-22 17:05:26 +00:00
crs 685bcfa05f fixed incorrect for-loop over directions conditional. 2002-05-22 17:02:58 +00:00
crs a5ae8011e2 win32 changes. replaced log dialog hack with a windows console
window.  now attaching thread input queues as necessary. shifted
code around so toggling toggle keys is immediately reflected by
secondary screen's keyboard.  now setting extended key flag for
keys that need it.  fixed handling of shift + caps-lock.  added
handling of keys that should distinguish between left and right
but don't.  fixed get/set of active window on leave/enter of
primary screen.  replaced 1x1 primary window with a full screen
window to work around a problem with losing key events.  changed
calculation of mouse move deltas.
2002-05-22 17:01:17 +00:00
crs 7ebaab42e0 fixes for win32 keyboard. 2002-05-05 19:38:09 +00:00
crs 2dad59a027 checkpoint. added half duplex for num lock. 2002-05-04 18:33:48 +00:00
crs 4d11079095 Fixes for win32 key handling. 2002-05-04 18:08:22 +00:00
crs 5641a875c1 checkpoint. made changes to support key autorepeats on X. 2002-05-03 11:26:44 +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 59c5e4bf13 Fixed uninitialized variable when computing toggle mask. Also
reduced priority of some mouse motion log messages.
2002-05-01 14:36:52 +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