diff options
author | Eion Robb <eion@robbmob.com> | 2008-06-17 03:47:38 +0400 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2008-06-17 03:47:38 +0400 |
commit | daf5d3c5e7f44d033d684477d62b91d70ac84f14 (patch) | |
tree | a8183a0b53140e812021b05d894c587ae0f7ffcc /skype_messaging_x11.c | |
parent | ac400d5693acd7a7a6a70def231daef93c226c93 (diff) |
Possible fix for X11 threading issues, start of new code to use blocking waits for events
Diffstat (limited to 'skype_messaging_x11.c')
-rw-r--r-- | skype_messaging_x11.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/skype_messaging_x11.c b/skype_messaging_x11.c index 139eb89..d7cf10b 100644 --- a/skype_messaging_x11.c +++ b/skype_messaging_x11.c @@ -23,7 +23,8 @@ skype_connect() unsigned long bytes_after_ret;
unsigned char *prop;
int status;
-
+ + XInitThreads();
XSetErrorHandler(x11_error_handler); #ifdef USE_XVFB_SERVER if (getenv("SKYPEDISPLAY")) @@ -160,6 +161,15 @@ send_message(char* message) g_thread_create((GThreadFunc)skype_message_received, "CONNSTATUS LOGGEDOUT", FALSE, NULL);
return;
}
+} + +Bool +check_for_clientmessage_predicate(Display *display, XEvent *event, XPointer arg) +{ + printf("skype x11 debug: %d %d\n", event->type, ClientMessage); + if (event && event->type == ClientMessage) + return True; + return False; }
static void
@@ -178,7 +188,8 @@ receive_message_loop(void) {
skype_debug_error("skype_x11", "display has disappeared\n");
break;
- }
+ } + //XIfEvent(disp, &e, check_for_clientmessage_predicate, NULL);
event_bool = XCheckTypedEvent(disp, ClientMessage, &e);
if (!event_bool)
{
|