diff options
author | Eion Robb <eion@robbmob.com> | 2007-11-14 07:59:18 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2007-11-14 07:59:18 +0300 |
commit | 94486f49c45ec66259dfca542c5105f1094a98b1 (patch) | |
tree | b403b0208dfe824fb3672d22a8ef3e6f038ae8b0 /skype_messaging_x11.c | |
parent | e91e13c7349636cd776ebb0b875317d3dc32310b (diff) |
More X11 error handling
Diffstat (limited to 'skype_messaging_x11.c')
-rw-r--r-- | skype_messaging_x11.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/skype_messaging_x11.c b/skype_messaging_x11.c index bc41c0d..1a12401 100644 --- a/skype_messaging_x11.c +++ b/skype_messaging_x11.c @@ -106,8 +106,7 @@ send_message(char* message) sscanf(message, "#%d ", &message_num);
sprintf(error_return, "#%d ERROR", message_num);
g_thread_create((GThreadFunc)skype_message_received, (void *)g_strdup(error_return), FALSE, NULL);
- } - g_thread_create((GThreadFunc)skype_message_received, "CONNSTATUS LOGGEDOUT", FALSE, NULL);
+ }
return;
}
@@ -156,12 +155,13 @@ receive_message_loop(void) msg_temp[21] = '\0';
while(run_loop)
- {
- XNextEvent(disp, &e);
+ { + XPeekEvent(disp, &e);
+ //XNextEvent(disp, &e);
if (e.type != ClientMessage)
{
purple_debug_info("skype_x11", "Unknown event received: %d\n", e.xclient.type);
- XPutBackEvent(disp, &e);
+ //XPutBackEvent(disp, &e);
XFlush(disp);
continue;
}
@@ -178,10 +178,12 @@ receive_message_loop(void) msg = g_string_append_len(msg, msg_temp, real_len);
else
{
- XPutBackEvent(disp, &e);
+ //XPutBackEvent(disp, &e);
XFlush(disp);
continue;
- }
+ } + + XNextEvent(disp, &e);
if (last_len < 21)
{
|