summaryrefslogtreecommitdiffstats
path: root/generic/tkUtil.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-08-09 21:20:33 (GMT)
committernijtmans <nijtmans>2009-08-09 21:20:33 (GMT)
commit7aefedb2ea921fbeb0f6d6b99afeb1224a319318 (patch)
treece53da0fddc1c8e4847bca5680922173a39e21b2 /generic/tkUtil.c
parent7dc7cda6232cfd38f3af5083634039d33b1959c2 (diff)
downloadtk-7aefedb2ea921fbeb0f6d6b99afeb1224a319318.zip
tk-7aefedb2ea921fbeb0f6d6b99afeb1224a319318.tar.gz
tk-7aefedb2ea921fbeb0f6d6b99afeb1224a319318.tar.bz2
Eliminate various gcc warnings
include <vssym32.h> only when available
Diffstat (limited to 'generic/tkUtil.c')
-rw-r--r--generic/tkUtil.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index ffa392f..342020c 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUtil.c,v 1.29 2009/04/10 16:00:12 das Exp $
+ * RCS: @(#) $Id: tkUtil.c,v 1.30 2009/08/09 21:20:33 nijtmans Exp $
*/
#include "tkInt.h"
@@ -1163,17 +1163,17 @@ TkMakeEnsemble(
void
TkSendVirtualEvent(Tk_Window target, const char *eventName)
{
- XEvent event;
+ union {XEvent general; XVirtualEvent virtual;} event;
memset(&event, 0, sizeof(event));
- event.xany.type = VirtualEvent;
- event.xany.serial = NextRequest(Tk_Display(target));
- event.xany.send_event = False;
- event.xany.window = Tk_WindowId(target);
- event.xany.display = Tk_Display(target);
- ((XVirtualEvent *) &event)->name = Tk_GetUid(eventName);
-
- Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL);
+ event.general.xany.type = VirtualEvent;
+ event.general.xany.serial = NextRequest(Tk_Display(target));
+ event.general.xany.send_event = False;
+ event.general.xany.window = Tk_WindowId(target);
+ event.general.xany.display = Tk_Display(target);
+ event.virtual.name = Tk_GetUid(eventName);
+
+ Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL);
}
/*
* Local Variables: