Mercurial > pidgin
comparison plugins/gestures/stroke-draw.c @ 4529:f630a793b9d4
[gaim-migrate @ 4807]
Mouse clicks when visualization is turned on should no longer be crashing
gaim. Sorry.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 05 Feb 2003 08:10:37 +0000 |
parents | 25c2119deab3 |
children | 6d1707dc8c3d |
comparison
equal
deleted
inserted
replaced
4528:f8fec48f0fde | 4529:f630a793b9d4 |
---|---|
20 #include <X11/Xutil.h> | 20 #include <X11/Xutil.h> |
21 | 21 |
22 | 22 |
23 static void gstroke_invisible_window_init (GtkWidget *widget); | 23 static void gstroke_invisible_window_init (GtkWidget *widget); |
24 /*FIXME: Maybe these should be put in a structure, and not static...*/ | 24 /*FIXME: Maybe these should be put in a structure, and not static...*/ |
25 static Display * gstroke_disp; | 25 static Display * gstroke_disp = NULL; |
26 static Window gstroke_window; | 26 static Window gstroke_window; |
27 static GC gstroke_gc; | 27 static GC gstroke_gc; |
28 static int mouse_button = 2; | 28 static int mouse_button = 2; |
29 static gboolean draw_strokes = FALSE; | 29 static gboolean draw_strokes = FALSE; |
30 | 30 |
137 gtk_timeout_remove (timer_id); | 137 gtk_timeout_remove (timer_id); |
138 | 138 |
139 gdk_pointer_ungrab (event->button.time); | 139 gdk_pointer_ungrab (event->button.time); |
140 timer_id = 0; | 140 timer_id = 0; |
141 | 141 |
142 if (gstroke_draw_strokes()) { | 142 if (gstroke_draw_strokes() && gstroke_disp != NULL) { |
143 /* get rid of the invisible stroke window */ | 143 /* get rid of the invisible stroke window */ |
144 XUnmapWindow (gstroke_disp, gstroke_window); | 144 XUnmapWindow (gstroke_disp, gstroke_window); |
145 XFlush (gstroke_disp); | 145 XFlush (gstroke_disp); |
146 } | 146 } |
147 | 147 |