"waiting" signal should only be sent once per input request
authorPhilip Chimento <philip.chimento@gmail.com>
Sun, 25 Oct 2009 22:16:08 +0000 (22:16 +0000)
committerPhilip Chimento <philip.chimento@gmail.com>
Sun, 25 Oct 2009 22:16:08 +0000 (22:16 +0000)
git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@152 ddfedd41-794f-dd11-ae45-00112f111e67

libchimara/event.c
libchimara/input.c

index 1bcdcd9b872ab26a0f3e581d68bf2b8e87eee5c5..765f6645bd234f01dd9b21d7b1871e664a970369 100644 (file)
@@ -149,9 +149,6 @@ glk_select(event_t *event)
 
        ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
        
-       /* Emit the "waiting" signal to let listeners know we are ready for input */
-       g_signal_emit_by_name(glk_data->self, "waiting");
-       
        get_appropriate_event(event);
 
        /* Check for interrupt */
index 4aca9d965f8dda0daba77e553d71779777c2127f..86cbe34fd08657d98ca97af42412c5f65486554e 100644 (file)
@@ -16,6 +16,8 @@ request_char_event_common(winid_t win, gboolean unicode)
        VALID_WINDOW(win, return);
        g_return_if_fail(win->input_request_type == INPUT_REQUEST_NONE);
        g_return_if_fail(win->type != wintype_TextBuffer || win->type != wintype_TextGrid);
+       
+       ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
 
        win->input_request_type = unicode? INPUT_REQUEST_CHARACTER_UNICODE : INPUT_REQUEST_CHARACTER;
        g_signal_handler_unblock( G_OBJECT(win->widget), win->keypress_handler );
@@ -37,6 +39,9 @@ request_char_event_common(winid_t win, gboolean unicode)
        
        gtk_widget_grab_focus( GTK_WIDGET(win->widget) );
        gdk_threads_leave();
+       
+       /* Emit the "waiting" signal to let listeners know we are ready for input */
+       g_signal_emit_by_name(glk_data->self, "waiting");
 }
 
 /** 
@@ -248,6 +253,9 @@ glk_request_line_event(winid_t win, char *buf, glui32 maxlen, glui32 initlen)
                break;
     }
        g_free(inserttext);
+       
+       /* Emit the "waiting" signal to let listeners know we are ready for input */
+       g_signal_emit_by_name(glk_data->self, "waiting");
 }
 
 /**
@@ -306,6 +314,9 @@ glk_request_line_event_uni(winid_t win, glui32 *buf, glui32 maxlen, glui32 initl
                break;
     }          
        g_free(utf8);
+       
+       /* Emit the "waiting" signal to let listeners know we are ready for input */
+       g_signal_emit_by_name(glk_data->self, "waiting");
 }
 
 /**