summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkdisplay-x11.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-01-04 01:28:07 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-01-04 01:28:07 +0000
commit1c2718400df991fa1dfaca93d31298001d73e458 (patch)
treecffc669352d33169f007fa0f4e71633cb702cc4b /gdk/x11/gdkdisplay-x11.c
parentd6b33b2ad531d98e9b895bbac6f791a746345a68 (diff)
downloadgtk+-1c2718400df991fa1dfaca93d31298001d73e458.tar.gz
Apply a patch by Chris Wilson to avoid spurious valgrind warnings from
2007-01-03 Matthias Clasen <mclasen@redhat.com> * gtk/*.c: * gdk/x11/*.c: Apply a patch by Chris Wilson to avoid spurious valgrind warnings from XSendEvent() calls. (#392532) svn path=/trunk/; revision=17044
Diffstat (limited to 'gdk/x11/gdkdisplay-x11.c')
-rw-r--r--gdk/x11/gdkdisplay-x11.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index fd48807f50..fa1524e0ad 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -996,24 +996,25 @@ broadcast_xmessage (GdkDisplay *display,
message_type_begin);
{
- XEvent xevent;
+ XClientMessageEvent xclient;
const char *src;
const char *src_end;
char *dest;
char *dest_end;
- xevent.xclient.type = ClientMessage;
- xevent.xclient.message_type = type_atom_begin;
- xevent.xclient.display =xdisplay;
- xevent.xclient.window = xwindow;
- xevent.xclient.format = 8;
+ memset(&xclient, 0, sizeof (xclient));
+ xclient.type = ClientMessage;
+ xclient.message_type = type_atom_begin;
+ xclient.display =xdisplay;
+ xclient.window = xwindow;
+ xclient.format = 8;
src = message;
src_end = message + strlen (message) + 1; /* +1 to include nul byte */
while (src != src_end)
{
- dest = &xevent.xclient.data.b[0];
+ dest = &xclient.data.b[0];
dest_end = dest + 20;
while (dest != dest_end &&
@@ -1034,9 +1035,9 @@ broadcast_xmessage (GdkDisplay *display,
xroot_window,
False,
PropertyChangeMask,
- &xevent);
+ (XEvent *)&xclient);
- xevent.xclient.message_type = type_atom;
+ xclient.message_type = type_atom;
}
}