2001-10-06 14:13:28 +00:00
|
|
|
CServer
|
|
|
|
* must have connection thread in screen info map
|
|
|
|
allows disconnect if screen map changes and screen is removed
|
|
|
|
* put mutex locks wherever necessary (like accessing m_active)
|
2001-10-23 22:45:59 +00:00
|
|
|
* must handle disconnect of screen by warping cursor off of it
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
CClient
|
|
|
|
* need methods for screen event handler to call as appropriate
|
|
|
|
|
|
|
|
server client
|
|
|
|
------ ------
|
|
|
|
[accept] <-- connect
|
|
|
|
challenge --> [encrypt]
|
|
|
|
[verify] <-- response (encrypted challenge, client name)
|
|
|
|
hangup if invalid
|
|
|
|
query info -->
|
|
|
|
<-- info (size)
|
|
|
|
|
|
|
|
...
|
|
|
|
enter (x,y) -->
|
|
|
|
clipboard data --> optional
|
|
|
|
mouse/key events --> optional
|
|
|
|
query clipboard --> optional
|
|
|
|
<-- clipboard data (cont.)
|
|
|
|
leave -->
|
|
|
|
|
|
|
|
...
|
|
|
|
grab clipboard -->
|
|
|
|
|
|
|
|
... (on clipboard ownership stolen)
|
|
|
|
<-- clipboard lost
|
|
|
|
|
|
|
|
... (on screen resize)
|
|
|
|
<-- info (size)
|
|
|
|
|
|
|
|
... (on screen saver, primary screen)
|
|
|
|
saver (on/off) -->
|
|
|
|
|
|
|
|
...
|
|
|
|
quit -->
|
|
|
|
<-- close
|
|
|
|
|
|
|
|
---
|
|
|
|
primary screen
|
|
|
|
open
|
|
|
|
close
|
|
|
|
enter
|
|
|
|
leave
|
|
|
|
warp
|
|
|
|
clipboard (get/set)
|
|
|
|
screen saver (show/hide)
|
|
|
|
queue events with server (including screen saver activation)
|
|
|
|
|
|
|
|
secondary screen
|
|
|
|
open
|
|
|
|
close
|
|
|
|
enter
|
|
|
|
leave
|
|
|
|
warp
|
|
|
|
synth mouse
|
|
|
|
synth key
|
|
|
|
clipboard (get/set)
|
|
|
|
screen saver (show/hide)
|
|
|
|
queue events with client (clipboard lost/changed, size change)
|
|
|
|
|
|
|
|
---
|
|
|
|
client:
|
|
|
|
open
|
|
|
|
close
|
|
|
|
wait: server messages, clipboard taken, screen resize, quit
|
|
|
|
|
|
|
|
server:
|
|
|
|
accept
|
|
|
|
asynchronously accept new clients
|
|
|
|
config
|
|
|
|
asynchronously accept and handle config message (via HTTP)
|
|
|
|
primary
|
|
|
|
asynchronously handle primary screen events
|
|
|
|
comm
|
|
|
|
send/recv messages to/from clients
|
2001-11-19 00:33:36 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
win32:
|
|
|
|
double click support
|
|
|
|
need to support window stations
|
|
|
|
login screen on NT is a separate window station
|
|
|
|
handle display changes
|
|
|
|
|
|
|
|
---
|
2001-11-25 18:32:41 +00:00
|
|
|
not sending VK_?WIN and VK_APPS. possibly hotkeys being stolen.
|
|
|
|
|
|
|
|
VkKeyScan() doesn't get proper shift state unless we map shift
|
|
|
|
(etc?) to VK_SHIFT not VK_LSHIFT or VK_RSHIFT.
|
|
|
|
|
|
|
|
not handling international characters
|
2001-11-19 00:33:36 +00:00
|
|
|
|
|
|
|
X11 key translation (server)
|
|
|
|
handle compose key?
|
|
|
|
* don't send compose, don't send dead keys, send composed key?
|
|
|
|
* send all keys, let client do compose
|
|
|
|
|
2002-04-25 10:44:01 +00:00
|
|
|
---
|
|
|
|
translate keys to keysyms
|
|
|
|
shift state is embedded in keysym
|
|
|
|
alt/ctrl/meta are stored separately, also caps/num/scroll lock
|
|
|
|
shift state also stored separately
|
|
|
|
|
|
|
|
Win32 to keysym:
|
|
|
|
VK code + shift -> keysym via table lookup
|
|
|
|
Win32 from keysym:
|
|
|
|
VK code and shift via table lookup
|
|
|
|
must synth shift key events to get correct character for key
|
|
|
|
|
|
|
|
don't allow leaving screen when any key is down
|
|
|
|
that includes shift keys
|
|
|
|
caps lock, etc must not be down but can be on
|
2002-04-26 20:15:59 +00:00
|
|
|
|
|
|
|
may need to handle "half-duplex" caps-lock on secondary screen
|
|
|
|
|
|
|
|
---
|
|
|
|
clipboard stuff:
|
|
|
|
PRIMARY -- the current selection, normally pastes with middle-mouse
|
|
|
|
CLIPBOARD -- set by cut/copy menu items, pasted via paste menu item
|
|
|
|
synergy must track and transfer both. however, only X clients need
|
|
|
|
the PRIMARY sent to them.
|
|
|
|
|
|
|
|
---
|
|
|
|
remove space pairs
|
|
|
|
not a good thing for formatting
|