When changing from a widget-based storage (that was, in retrospect a
horrible hack) to a screen data item, I neglected to fix the code that doles out key events to screens and clients. This meant screens didn't get keys. It's now fixed.
This commit is contained in:
+1
-2
@@ -69,8 +69,7 @@ handle_input ()
|
||||
|
||||
// Give current screen a shot at the key first
|
||||
s = screenlist_current ();
|
||||
w = widget_find( s, KEYS_WIDGETID );
|
||||
if( s->parent && w && w->text && strchr( w->text, key ) ) {
|
||||
if( s->keys && strchr( s->keys, key ) ) {
|
||||
// This screen wants this key. Tell it we got one
|
||||
sprintf(str, "key %c\n", key);
|
||||
sock_send_string(s->parent->sock, str);
|
||||
|
||||
@@ -31,9 +31,6 @@ typedef struct widget {
|
||||
|
||||
extern char *types[];
|
||||
|
||||
// RESERVED widget ID for keys active on a screen
|
||||
#define KEYS_WIDGETID "screenkeys"
|
||||
|
||||
widget *widget_create ();
|
||||
int widget_destroy (widget * w);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user