Commit Graph

202 Commits

Author SHA1 Message Date
crs ddfc05244b Removed accidental debugging code. 2003-05-03 14:54:03 +00:00
crs ed439ec33c Added global configuration option to disable screen saver
synchronization.
2003-05-03 14:38:36 +00:00
crs 65de05e3ec Forgot to restore global auto-repeat configuration on exit. 2003-05-03 13:57:52 +00:00
crs 3fc40e1939 Now warping mouse to center of screen when leaving client screens.
Some users requested this.  Also, the hider window is mapped before
warping the mouse so the active window shouldn't change if the focus
policy is point-to-focus.  Showing the window first can also reduce
the likelihood of seeing the cursor briefly in its hidden position.
2003-05-03 13:50:06 +00:00
crs af110dbce2 Now turning off auto-repeat when on an X11 client. This prevents
the server from auto-repeating fake events, which is undesired
since synergy will do the auto-repeating itself.  This also
disables auto-repeat on any keys locally configured on X11 to not
auto-repeat.  That's mainly to suppress auto-repeat on modifier
keys, which auto-repeat on win32 but not X11.
2003-05-03 13:28:21 +00:00
crs 75729cef46 Fixed a few win32 keyboard/mouse problems. First, the mouse hook
now captures non-client area mouse messages.  Previously, these
were ignored (because i forgot about them) and they caused all
kinds of problems because they weren't forwarded.  For example,
clicking on a window border would cause the window to start
resizing when the mouse came back to the server screen.  Moving
inside a title bar meant that the mouse wouldn't move on the
client screen.

Second, because non-client messages are now handled, the full
screen transparent window is no longer necessary to capture
input so it's never displayed.  (The window is still necessary
for clipboard ownership so it's still created.)  No transparent
window means no screen flashing.  It also means we don't have to
become the foreground and active window.  This plays better with
apps that minimize or restore when they're no longer the
foreground application/active window.

Third, fixed the low level keyboard hook to forward toggle key
updates, which it was neglecting to do.

Finally, keyboard and mouse input is always forwarded from the hook
to the primary screen handler which then shadows the current key
and mouse button state.  If we're using low level hooks then this
isn't really necessary and GetKeyState() always returns the right
info but without low level hooks it means we can just use the
shadow state.  It also means we don't have to show our window in
order to get the system's key state table up to date, fixing the
screen flash when checking for the scroll lock state.
2003-05-03 12:54:22 +00:00
crs 8d9134f93a Boosted priority of main synergy threads to be very high (highest
realtime priority).  After some testing it appears that anything
less than this can starve synergy in some circumstances, preventing
it from forwarding messages to clients.  This is a rather risky
change since synergy can now virtually take over a system if it
behaves badly.  This change only affects windows systems since
lib/arch of other platforms don't yet attempt to boost priority.
2003-05-03 12:37:03 +00:00
crs 42ea6306f6 Fixes to previous checkpoint. Non-ascii keys seem to work correctly.
Still not supporting key composition on X11.
2003-04-27 18:05:32 +00:00
crs 11f90022e0 Checkpointing improved key handling. This change adds non-ASCII
key handling to win32 on both client and server.  It also changes
the protocol and adds code to ensure every key pressed also gets
released and that that doesn't get confused when the KeyID for
the press is different from the KeyID of the release (or repeat).
2003-04-27 17:01:14 +00:00
crs cf7ab3459d Added KeySym <-> Unicode mappings. Changed code to use those
mappings to better support Unicode key events.
2003-04-24 20:11:38 +00:00
crs 54cc95123b Win32 project configuration fixes. 2003-04-16 20:59:25 +00:00
crs 56bafdb0e2 Minor win32 fixes. 2003-04-16 20:59:14 +00:00
crs 368d8cae39 Now allowing screen names with underscores. 2003-04-16 20:05:00 +00:00
crs aeb3f760d0 Fixed incorrect initialization of an XMotionEvent. 2003-04-14 22:16:21 +00:00
crs 6a108ed2d5 Added workaround for apparent Xinerama bug when warping the pointer.
This should allow synergy to be used on a system using Xinerama to
create a single logical screen from multiple physical screens.
2003-04-14 22:15:56 +00:00
crs a4a08c3ce6 Removed periodic call to XForceScreenSaver() to prevent the built-in
screen saver from activating.  It was unnecessary since the built-in
screen saver is disabled as appropriate;  this call was just to
ensure that the screen saver wouldn't start if an external program
reactivated the screen saver after synergy disabled it.

It's possible that this was causing screen flicker under gnome, though
i don't know why.  It's also possible that periodically sending events
to xscreensaver is causing the flicker but removing that code is more
difficult because xscreensaver can't be disabled, only deactivated or
killed.
2003-04-13 17:13:27 +00:00
crs 4521fe4990 Fixed several win32 bugs. First, synergy wasn't forwarding mouse
events to other hook functions, which broke some tools like objectbar.
Second, windows key processing was fixed.  Previously pressing and
release the key would only send a press event, locking the user onto
the client window;  also, the win32 server treated as a Meta modifier
instead of a Super modifier, which broke any use of it as any kind of
modifier key.  Third, added hacks to support several key combinations
on windows 95/98/me that are treated specially by windows, including
Alt+Tab, Alt+Shift+Tab, Alt+Esc, Alt+Shift+Esc, Ctrl+Esc, and any
combination using the windows key like Win+E and Win+F but not
Ctrl+Alt+Del.  Fourth, scroll lock only locking to the client (which
only happened when using a synergy server on windows) has been fixed;
unfortunately the solution causes a lot of screen redraws for some
reason.  Finally, there's been a fix to clipboard handling that may
or may not fix a problem where the clipboard would stop transferring
between systems after a little while.  I can't be sure if it fixes
the problem because I can't reproduce the problem.
2003-04-13 14:59:53 +00:00
crs 2d168319e4 Changed version to 1.0.7. 2003-04-13 14:38:40 +00:00
crs c2bd4ebd4c Changed MS clipboard text converters to truncate the clipboard
data at the first NUL.  This fixes a bug when interoperating
with some win32 programs.
2003-04-08 19:26:35 +00:00
crs 5320f663ba Changed version to 1.0.6. 2003-03-26 21:03:58 +00:00
crs 125e81c92e This should fix multimon support on win32. 2003-03-25 21:31:39 +00:00
crs 9dabd425a5 Added check for the screen saver actually being active before
entering the loop waiting for it to deactivate.  The failure
to check was causing the screen saver code to kick in when
the screen saver timeout occurred, even if the screen saver
wasn't enabled (because Windows still sends the screen saver
activating message for no good reason when the screen saver
is disabled).
2003-03-21 19:16:37 +00:00
crs 95263289ac Fixed errors in merge causing infinite loops. 2003-03-21 19:14:32 +00:00
crs 995c9547cf Fixed getWindowProperty(). It wasn't catching all failure
cases correctly.
2003-03-21 19:13:15 +00:00
crs a5633b1971 Added options and advanced options dialogs which should've been
part of an earlier checkin.  Also now saving and restoring
options that aren't in the configuration file to/from the
registry.
2003-03-17 22:32:10 +00:00
crs a7e2141ede Added a log message why the user is locked to the screen. 2003-03-17 22:32:01 +00:00
crs 0fd70ee536 Added type casts to avoid warning. 2003-03-17 22:31:59 +00:00
crs 9f984ad1a0 Fixed detection of screen saver shutdown on windows nt. 2003-03-16 17:40:57 +00:00
crs 74e50877e9 Made releaseKeys() only synthesize key releases for those keys
that synergy synthesized a press for, not keys that the user
is physically pressing.
2003-03-16 17:40:56 +00:00
crs de64342292 Minor hook fixes. 2003-03-16 17:40:47 +00:00
crs 635a2a7c5f Moved comment to more relevant location. 2003-03-13 20:24:45 +00:00
crs a7bafcca2f Fixed double locking of mutex. 2003-03-13 19:20:55 +00:00
crs 1d17f865ea Added switch delay and double-tap options to win32 and added a
tray icon to the client and server that gives status feedback to
the user and allows the user to kill the app.
2003-03-12 22:34:07 +00:00
crs f411df65fb Added support for a user option to require hitting the edge of a
screen twice within a specified amount of time in order to switch
screens.  This can help prevent unintended switching.
2003-02-23 19:29:08 +00:00
crs 7bbd33d787 Added support on X11 for a global option to delay switching screens
when the mouse reaches a jump zone.
2003-02-22 21:53:25 +00:00
crs aef50800e3 Added global options to CConfig (needed for heartbeat option). 2003-02-22 16:41:03 +00:00
crs 366537dc22 Added support for heartbeat global option. 2003-02-22 16:20:23 +00:00
crs 8685afd9f6 Changed version to 1.0.5. 2003-02-22 15:04:09 +00:00
crs 5f164375d4 Changes to support remapping modifier keys on clients. 2003-02-22 15:03:31 +00:00
crs 6301af9d50 Changed version to 1.0.3. 2003-02-17 12:44:37 +00:00
crs dd339fe375 Changed win32 client side cursor warping to be all relative motion
when not on the primary monitor.  This should eliminate the flicker
between virtual display 0,0 and the correct position.  While this
allows the user to confuse synergy by using the client's mouse,
synergy recovers quickly and easily from any confusion.
2003-02-16 19:55:54 +00:00
crs 2fc8780285 Added hack to heuristically detect bogus mouse motion caused by
a race condition where the synergy server updates the mouse
position but the synergy hook later receives a mouse update from
before the position change (i.e. out of order).
2003-02-16 19:53:56 +00:00
crs 9a7e452a3e Commented out an unnecessary hook and added a compile time
switch to disable grabbing of keyboard on win32 to facilitate
debugging.
2003-02-16 19:51:46 +00:00
crs 60fdb1f529 Changed heap to stack allocation in an oft-called function for
data that's never used outside the function.
2003-02-16 19:50:36 +00:00
crs 3351a66f51 Fixed memory leaks. 2003-02-16 19:49:44 +00:00
crs 57ba0cb660 Fixed incorrect mouse button swapping on client screens. 2003-02-12 20:59:25 +00:00
crs c148bc7c9c Fixed error in debug build on win32. 2003-02-12 20:59:08 +00:00
crs fefe457517 Added a simple implementation of vsnprintf for unix platforms
without it using /dev/null, vfprintf(), and vsprintf().
2003-02-12 19:50:22 +00:00
crs 154a474289 Made sure every file includes common.h directly or indirectly.
Also made sure common.h is included before any system headers.
2003-02-12 19:38:39 +00:00
crs 116005d64f To support keymaps with only upper (or lower) case keysyms we now
use Xlib to convert an unmatched keysym to upper and lower case and
use whichever, if any, is not the same as the original keysym.
This supports case conversion in any language that Xlib supports
it in.
2003-01-29 22:16:40 +00:00
crs dedb48d244 Applied patch from grmcdorman at users dot sourceforge dot net to
support keymaps that have only uppercase letters, which is the case
by default on the Sun X server (for US keyboards anyway).
2003-01-29 19:32:25 +00:00
crs 06ed985f84 Changed version number to 1.0.2. 2003-01-25 13:39:26 +00:00
crs 6b3e451b83 Added ability to set screen options from the windows launch dialog. 2003-01-25 13:34:51 +00:00
crs 188d89108b Added missing entry in a socket family table. This was a serious
bug and should've failed on all platforms but just happened to
work on linux and windows.
2003-01-25 13:34:17 +00:00
crs 669f0b3974 Changed version number to 1.0.1. 2003-01-22 08:37:32 +00:00
crs a55119f096 Fixed running as a service on Windows NT family. 2003-01-22 08:36:43 +00:00
crs 784297af24 Changed version number to 1.0.0. Documentation updates. 2003-01-18 16:21:36 +00:00
crs e86e552ac8 Fixed stupid errors introduced by last attempt to fix broken
mouse behavior on multimonitor windows systems.  Those errors
broke synergy on all windows systems running as a server.
Also added an attempt to reduce the occasional jump that can
occur when switching screens when windows is the server.
2003-01-18 14:36:19 +00:00
crs 68a591210b Was forcing modifier keys that have no effect on the keysym
lookup to be up when synthesizing key events.  Now leaving
those modifiers in their current state.
2003-01-18 14:31:54 +00:00
crs 24c0b3fd32 Fixed lookup of neighbor screens. The first problem was an old
code in a conditional for moving left that blew an assert verifying
that the mouse position was really on the screen if the neighbor
screen wasn't connected.

After that was fixed there was another problem when one screen
linked to another which then linked (in the same direction) to
itself.  If the latter screen wasn't connected then it'd get into
an infinite loop.
2003-01-16 21:28:15 +00:00
crs a8bd4e7ff0 Moved log message into conditionals so it only appears when the
conditions are true.
2003-01-14 19:46:41 +00:00
crs f7e936faa9 Another try at fixing broken mouse behavior when a windows system
has multiple monitors with 0,0 of the virtual desktop not at the
upper-left.
2003-01-14 19:46:17 +00:00
crs 6c56f8a9fc Removed unnecessary variable names. 2003-01-12 16:35:11 +00:00
crs b2e11d3d35 Now catching and ignoring errors when writing to a socket in those
cases where errors were not being caught, typically when responding
to some other socket or protocol error.
2003-01-12 16:08:45 +00:00
crs a14a462e22 Fixes to support FreeBSD and Darwin. 2003-01-11 21:06:21 +00:00
crs 4bf0836eae Synergy no longer tries to suppress the screen saver once it starts.
It was doing that already if started through synergy but not if
started by something outside of synergy.  In particular, if you
use `xscreensaver-command --activate' synergy used to send fake
mouse motion events every 5 seconds to deactivate it.  That's
unlikely to be what the user wanted, especially if the locking is
enabled since it would force the password dialog to appear.

As before, it's recommended that client screens not use locking
because xscreensaver will not deactivate without getting a
password even if we make the request through a programmatic
interface.  Presumably that's for security reasons but it makes
life harder for synergy.
2003-01-11 15:16:41 +00:00
crs 1758ea6f9f Attempt to fix problems with multimon windows. The mouse position
reported by the synergy hook dll is in a space with 0,0 in the
upper-left which is not necessarily the same as the virtual desktop
space.  So the windows primary screen now accounts for that.  On
the secondary screen, mouse_event() doesn't seem to accept negative
coordinates even on the windows NT family, making monitors with
negative coordinates inaccessible via absolute moves.  So if the
move will be to negative coordinates, use the windows 95 family
fallback of absolute moving to 0,0 then relative moving to the
final position.
2003-01-11 14:01:44 +00:00
crs 7872c30111 Portability fixes. Now builds on Linux 2.2 and 2.4 and solaris.
Also builds on i386, alpha, G3/G4, and sparc.
2003-01-08 21:36:14 +00:00
crs 0347bb1667 Changed log level of two messages. Now won't spew about reading
window properties and will report connection failure at DEBUG
instead of DEBUG1.
2003-01-08 21:36:13 +00:00
crs 84d75600a9 Changed version number to 0.9.15. Added 0.9.15 log entries. 2003-01-07 21:47:27 +00:00
crs 9a245498a6 Attempts to improve forcing synergy window to foreground. These
changes don't seem to improve the situation but don't seem to
hurt either.
2003-01-07 21:12:51 +00:00
crs 1fd7ce14f3 Added low-level mouse hook to support mouse wheel on NT (>=SP3).
Thanks to karsten for the patch used as a starting point.
2003-01-07 21:11:54 +00:00
crs f832bdaf12 Added missing files. 2003-01-05 21:52:28 +00:00
crs e9cc0b434e Moved CPrimaryScreen and CSecondaryScreen to the lib/synergy
and the platform specific implementations to lib/platform.
Added an lib/arch method to query the platform's native wide
character encoding and changed CUnicode to use it.  All
platform dependent code is now in lib/arch, lib/platform,
and the programs under cmd.  Also added more documentation.
2003-01-05 21:48:54 +00:00
crs f65921bc3f Refactored some platform dependent code into a new library,
lib/arch.  This should make porting easier.  Will probably
continue to refactor a little more, moving platform dependent
event handling stuff into lib/platform.
2003-01-04 22:01:32 +00:00
crs 22457c78fe Made synrgyhk.dll error messages less cryptic. 2002-12-25 22:56:09 +00:00
crs 5220314c4f Changed version number to 0.9.14. Added NEWS item. 2002-12-25 19:21:17 +00:00
crs fd5625ba99 Improved handling of screen saver handling when windows 2k is
the client and the screen saver is password protected.  It used
to immediately turn off the screen saver (unintentionally) in
that case.
2002-12-25 18:44:54 +00:00
crs 41dc621579 Fixed typos. 2002-12-25 18:42:39 +00:00
crs 9567a970a8 Changes to support building on solaris, irix, and darwin. Also
removed test for working fork (AC_FORK).
2002-12-25 10:35:59 +00:00
crs de1fadc027 Added OptionTypes.h to VC++ project. 2002-12-24 10:01:28 +00:00
crs 1eb2ed2d3f No longer sending options if there aren't any and no longer
sending a reset before sending options (the caller can do
that if necessary).
2002-12-23 14:49:14 +00:00
crs 50e9e855b0 Fixed handling of %I arguments to readf() and writef(). 2002-12-23 14:48:12 +00:00
crs 78538da754 Added code to process set/reset options messages from server. 2002-12-23 14:47:44 +00:00
crs 3fc1ddf6ce Added support for per-screen options in the configuration file
and sending those options to the appropriate client screens.
Currently, two options are supported:  halfDuplexCapsLock and
halfDuplexNumLock mark the caps lock and num lock keys,
respectively, as being half-duplex.
2002-12-23 13:55:21 +00:00
crs 9c70921525 Now handling any number of pointer buttons. 2002-12-15 22:39:59 +00:00
crs 2559dd2f05 Now ignoring half-duplex keys that are down when deciding if
the mouse is locked to the screen.  We can't tell if a half-
duplex key is physically down and logically down just means
it's active so there's no point in letting it lock the mouse
to the screen.
2002-12-15 22:17:18 +00:00
crs 7649afa00a Now restoring toggle key states on leaving a client screen to
their state when the screen was entered.  Previously when
leaving a client screen the toggle keys kept their state so,
say, caps lock, would remain on.  This was inconvenient if
you then used the client's keyboard directly.
2002-12-15 22:14:49 +00:00
crs 2128302307 Fixed loss of ctrl+alt when transmitted to non-windows platforms
from a windows server.  Was converting ctrl+alt on windows to
mode switch on the server.  No longer doing that;  windows clients
will interpret ctrl+alt as AltGr and other clients will just see
ctrl+alt.  Also made the right alt key mode switch on windows
servers in case the user wants to force a mode switch, but that
means the right alt key no longer acts as alt on clients.
2002-12-15 20:00:52 +00:00
crs 773fcae8b3 Fixed client not reconnecting when server dies bug. 2002-12-15 19:58:41 +00:00
crs eda93fc20d Cleanup and changed some DEBUG1 messages to DEBUG2. 2002-12-15 19:57:28 +00:00
crs 3ae1c67aef Changes for version 0.9.13. 2002-11-05 19:56:56 +00:00
crs 52d8edb747 Fixed bug in detecting screen saver activation. Was using || instead
of && in conditional.
2002-11-05 19:23:05 +00:00
crs ca984acb91 Removed configure check for mbstate_t and uses of it. 2002-11-03 18:20:21 +00:00
crs 17e8ba2dbd Merged fixes for building on MacOS X. It dies on one file with
an 	internal compiler error;  building that file without
optimization works around the compiler bug.  Sadly, synergy can
only interact with X windows, not native MacOS windows.
2002-11-03 18:09:28 +00:00
crs cf13980bb8 Fixed bugs in error handling in CTCPSocket; previously was not
handling read errors at all and error handling for writes was
never being used.  Now the socket disconnects if a read or write
fails on the socket for any reason except EINTR.  Also added
<netinet/in.h> to includes in CNetwork.h because it's needed on
some platforms.
2002-10-30 22:16:30 +00:00
crs 9102fb80b9 Ported recent changes to win32 and fixed CRLF problems with project
files (most had CRCRCRLF).
2002-10-29 22:07:55 +00:00
crs e06368b950 fixed typo in makefile. 2002-10-29 07:40:43 +00:00
crs 541276595e solaris configure and build fixes. without having solaris i
can only hope that these changes actually work.
2002-10-28 22:49:21 +00:00
crs 24119802c6 Removed obsolete comment. 2002-10-28 21:33:48 +00:00