Applied patches supplied by Andre' Breiler:
- bugfixes for display != MatrixOrb LCD
- changes the meaning of output_state
+ it's now a bitfield where evry bit corresponds to
one output
- protocol change
output on|off|value
where on = all outputs on
off = all outputs off
value = output on for all 1 bits
- changes the behavior for key presses
Keypresses are now deliverd to _all_ clients (not only
the one with the active screen)
reason: I have an client which is only active a few seconds after
an keypress
- changes the protocol so that a response is sent for every
command
reason: the client needs to communicate with the server with a
minimal latency
This commit is contained in:
+11
-21
@@ -62,28 +62,18 @@ handle_input ()
|
||||
debug ("handle_input(%c)\n", (char) key);
|
||||
|
||||
if (key) {
|
||||
s = screenlist_current ();
|
||||
if (s) {
|
||||
c = s->parent;
|
||||
if (c) {
|
||||
// TODO: Interpret and translate keys!
|
||||
// If the client should have this keypress...
|
||||
// Send keypress to client
|
||||
if (key >= 'E' && key <= 'Z') {
|
||||
// TODO: Implement client "acceptable key" lists
|
||||
sprintf (str, "key %c\n", key);
|
||||
sock_send_string (c->sock, str);
|
||||
}
|
||||
// Otherwise, tell the server about it.
|
||||
else {
|
||||
server_input (key);
|
||||
}
|
||||
} else {
|
||||
// If no parent, it means we're on the server screen.
|
||||
// so, the server gets all keypresses there.
|
||||
server_input (key);
|
||||
}
|
||||
/* s = screenlist_current (); */
|
||||
c = (client *)LL_GetFirst(clients);
|
||||
while(c) {
|
||||
// TODO: Interpret and translate keys!
|
||||
// If the client should have this keypress...
|
||||
// Send keypress to client
|
||||
// TODO: Implement client "acceptable key" lists
|
||||
sprintf(str, "key %c\n", key);
|
||||
sock_send_string(c->sock, str);
|
||||
c = (client *)LL_GetNext(clients);
|
||||
}
|
||||
server_input (key);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user