Added support for "client_add_key" and "client_delete_key" functions.

Clients must now request keys using either client_add_key or screen_add_key
to receive key events.  If a screen is active (on the display) and it
has registered a key with "screen_add_key" it will be the only client
to get that key.  If the current screen doesn't want the key, it will
be sent to all clients that have registered that key using "client_add_key".

If you want to define a "hot button" for your client, you should probably
register that "hot key" with "client_add_key" and then list the keys that
control your client with "screen_add_key" on each screen.  If you don't
have a "hot key", then just register keys with "screen_add_key" and you'll
get keystrokes only when your screen is active.

Also fixed some formatting (spaces versus tabs) in a couple of places.
This commit is contained in:
ppokorny
2001-05-11 17:55:36 +00:00
parent f0276139d0
commit 3e4ce08d43
5 changed files with 104 additions and 34 deletions
+5
View File
@@ -24,6 +24,7 @@ client_data_init (client_data * d)
d->ack = 0;
d->name = NULL;
d->client_keys = NULL;
d->screenlist = LL_new ();
if (!d->screenlist) {
@@ -57,6 +58,10 @@ client_data_destroy (client_data * d)
if (d->name)
free (d->name);
// Clean up the key list...
if (d->client_keys)
free (d->client_keys);
// Clean up the screenlist...
debug ("client_data_destroy: Cleaning screenlist\n");
LL_Rewind (d->screenlist);