Commit Graph

56 Commits

Author SHA1 Message Date
crs 8334d987f5 added unix specific implementation of CXWindowsScreen::mainLoop()
that uses poll() to process events more efficiently.  it won't
wake up nor sleep any more than necessary, unlike the platform
independent implementation that polls and sleeps.
2002-07-25 09:55:01 +00:00
crs 3bfd2e252e finished INCR transfer changes. also made motifGetTime() return
icccmGetTime() because it seems motif does TIMESTAMP like ICCCM.
2002-07-25 09:23:24 +00:00
crs d3ea39149a checkpoint. working on INCR transfers. 2002-07-25 08:57:46 +00:00
crs 63b1d4397a fixes for win32 due to changes in how s_restartable is handled.
the main change is that WM_QUIT now causes the thread to be
cancelled instead of mainLoop() just returning.  this also
requires runDaemon() to call the run function in a new thread
each time it calls it because it could can cancelled.
2002-07-24 19:26:18 +00:00
crs 2e6e8e179a fixes for win32 clipboard due to CUnicode nul terminator changes. 2002-07-24 19:24:21 +00:00
crs 67051556bb fixed type of TARGETS target. 2002-07-24 17:30:32 +00:00
crs 5fe7763d37 made handling of nul terminators in CUnicode more sane. 2002-07-24 17:22:01 +00:00
crs 6fc6805a06 some fixes for motif clipboard. still not handling incremental
transfer through root window property because not sure of the
protocol.
2002-07-24 17:07:52 +00:00
crs c6ecc79c0d removed restart function from platform. no longer trying to
restart if the X server connection was lost;  since synergy
is likely to be started by xdm or the user's xsession, it's
better for synergy to simply terminate when the connection
is lost.  synergy will still restart due to other errors.
also fixed numerous other minor bugs and cleaned some stuff
up (like app error codes are now consistent and enumerated
in Version.h, for lack of a better place).  and boosted
version and protocol numbers.
2002-07-24 13:01:18 +00:00
crs 7d7b7f85ca fixed a bug in clipboard conversion (was using wrong converter or
no converter when one was available).
2002-07-23 18:59:44 +00:00
crs 8ada1e8a72 unicode clipboard changes for win32 plus some bug fixes. 2002-07-23 15:26:40 +00:00
crs b1163aa593 removed unnecessary atoms from X clipboard object. 2002-07-23 12:35:36 +00:00
crs 1f5cb6a96f checkpoint. more UTF8 clipboard stuff. 2002-07-23 11:36:18 +00:00
crs 16cc05d56b checkpoint. more UTF8 clipboard testing. 2002-07-23 09:33:50 +00:00
crs fcd99c9510 checkpoint. more UTF8 clipboard stuff. 2002-07-22 18:46:57 +00:00
crs c4f21ce29b checkpoint. more UTF8 clipboard stuff. 2002-07-22 18:17:21 +00:00
crs bb966cdd65 checkpoint. working on UTF8 clipboard transfer. 2002-07-22 18:03:44 +00:00
crs 643d0f1089 checkpoint. adding support for unicode in clipboard. 2002-07-22 17:32:51 +00:00
crs cf71aec730 fixed handling of calling init() when a previous process did not
call cleanup().  if that process still appears to exist then the
init() fails.  otherwise some cleanup is performed and the init()
proceeds.  a synergy server started while another is running will
now exit immediately without interfering the original server.
2002-07-18 17:03:10 +00:00
crs 0759cbc104 changed waitForEvent() to handle a peculiar feature of
MsgWaitForMultipleObjects():  it will not return immediately
if an event already in the queue when it's called was already
in the queue during the last call to GetMessage()/PeekMessage().
also now discarding screen saver events if there are any other
screen saver events in the queue already.  this prevents these
events from piling up in the queue, which they'd do because we
sleep for 250ms when handling each one.
2002-07-18 16:58:08 +00:00
crs 76cc62d133 attempt to fix stuttering when leaving win32 screen. seems to
work but will let testers make the final call.  also fixed
desktop synchronization by setting a variable that was
mistakenly left unset.  and tried to work around an apparent
bug in MsgWaitForMultipleObjects() that prevented the service
from closing down properly.  start/pause/continue/stop
sequence still doesn't shut down correctly.  start/pause/stop
and start/stop work fine.
2002-07-17 17:27:41 +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 0bfe12d6ab completing previous checkin. 2002-07-15 15:03:04 +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 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 f4a73c28a2 added win32 screen saver class forgotten in previous checkins. 2002-07-01 12:58:52 +00:00
crs 6cc3b50d3b fixed re-entrant calls to X bug. 2002-06-26 12:44:52 +00:00
crs 76db457830 win32 screen saver now handled. 2002-06-23 21:53:31 +00:00
crs 7100e07d2b now disabling disable job timer when forcing screen saver
activation.  previously the timer would deactivate the screen
saver shortly after activation.  job timer is restored when
the screen saver is deactivated.
2002-06-23 21:48:33 +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 4d113aa235 fixes to get xscreensaver integration working. 2002-06-22 20:29:59 +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 b83c0c5928 now blocking SIGINT and SIGTERM in restart function. the child
should handle the signal and terminate.  then the restart
function will exit.
2002-06-21 15:15:34 +00:00
crs cec075cb60 fixed bug introduced by previous checkin. calling XCheckIfEvent()
multiple times is *not* the same as calling XIfEvent() because the
former will re-encounter events that it didn't process previously.
to make things simple it now pulls events off the queue and saves
them if not processed for selection transfer and puts them back
afterwards.
2002-06-20 16:27:49 +00:00
crs 2423dc662d speeded up clipboard transfer by avoiding a selection request
when it wasn't necessary.  (in particular, we were getting the
clipboard update time from the owner then emptying the clipboard,
so we didn't need to get the time.  worse, most owners don't
support getting the time and we often timed out.)

also fixed a multithread bug using the X display.  we were using
a CThread to send an event after a timeout while we were waiting
in XIfEvent().  this necessarily involved two threads calling
into Xlib at once, which is not allowed.  now using polling to
do the timeout because Xlib doesn't have a function to get
events with a timeout.
2002-06-20 14:01:44 +00:00
crs 3d27de39bb checkpoint. trying to fix a delay when sending clipboards on X. 2002-06-20 13:35:28 +00:00
crs bebb63ac53 checkpoint. initial support for multiple displays on win32. 2002-06-19 17:03:29 +00:00
crs c4f1dbdae4 checkpoint. automake changes for wait(). 2002-06-19 12:21:26 +00:00
crs 8a103ce63c checkpoint. automake changes for reentrant functions. 2002-06-19 11:58:48 +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 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 2b07c8091c windows fixes needed for formatting changes. 2002-06-11 20:09:59 +00:00
crs fba8063c17 added missing #include <signal.h>. 2002-06-11 18:30:08 +00:00