Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2011-11-21 01:21:41 +0400
committerEion Robb <eion@robbmob.com>2011-11-21 01:21:41 +0400
commit566398e36a101af0b0d4c594bbd8f16d0c5c3ff2 (patch)
tree9f15568737c1149fa91ebb2c88cac8b5fcef5b98 /skype_messaging_x11.c
parent77b6cb6c0d00b4cfa8589dbcddc1480a493635f0 (diff)
Fix crash on disconnect on X11 - Patch from Mike Lundy - References issue #175
Diffstat (limited to 'skype_messaging_x11.c')
-rw-r--r--skype_messaging_x11.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/skype_messaging_x11.c b/skype_messaging_x11.c
index 96d8f92..31cad23 100644
--- a/skype_messaging_x11.c
+++ b/skype_messaging_x11.c
@@ -24,8 +24,8 @@
#include <X11/Xatom.h>
static Display *disp = NULL;
-static Window win = (Window)-1;
-Window skype_win = (Window)-1;
+static Window win = (Window)None;
+Window skype_win = (Window)None;
static GThread *receiving_thread = NULL;
Atom message_start, message_continue;
static gboolean run_loop = FALSE;
@@ -71,7 +71,7 @@ skype_connect()
0, BlackPixel( disp, DefaultScreen( disp ) ),
BlackPixel( disp, DefaultScreen( disp ) ));
XFlush(disp);
- if (win == -1)
+ if (win == None)
{
XCloseDisplay(disp);
skype_debug_info("skype_x11", "Could not create X11 messaging window\n");
@@ -83,8 +83,8 @@ skype_connect()
{
XDestroyWindow(disp, win);
XCloseDisplay(disp);
- win = (Window)-1;
- skype_win = (Window)-1;
+ win = (Window)None;
+ skype_win = (Window)None;
skype_debug_info("skype_x11", "Could not create skype Atom\n");
return FALSE;
}
@@ -94,9 +94,9 @@ skype_connect()
{
XDestroyWindow(disp, win);
XCloseDisplay(disp);
- win = (Window)-1;
+ win = (Window)None;
XFree(prop);
- skype_win = (Window)-1;
+ skype_win = (Window)None;
skype_debug_info("skype", "Skype instance not found\n");
return FALSE;
}
@@ -116,11 +116,11 @@ static void
skype_disconnect()
{
run_loop = FALSE;
- skype_win = (Window)-1;
+ skype_win = (Window)None;
if (disp != NULL)
{
- if (win != -1)
+ if (win != None)
{
//wait here for the event to be handled
XDestroyWindow(disp, win);
@@ -128,7 +128,7 @@ skype_disconnect()
XCloseDisplay(disp);
}
- win = (Window)-1;
+ win = (Window)None;
disp = NULL;
}
@@ -150,7 +150,7 @@ send_message(const char* message)
char *error_return;
unsigned int i;
- if (skype_win == -1 || win == -1 || disp == NULL)
+ if (skype_win == None || win == None || disp == NULL)
{
//There was an error
if (message[0] == '#')