summaryrefslogtreecommitdiffstats
path: root/generic/tkText.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/tkText.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/tkText.c')
-rw-r--r--generic/tkText.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 4e605ce..7a5fa46 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.c,v 1.89 2009/02/06 08:12:07 das Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.90 2009/08/09 21:20:33 nijtmans Exp $
*/
#include "default.h"
@@ -3402,16 +3402,16 @@ TkTextSelectionEvent(
* event generate $textWidget <<Selection>>
*/
- XEvent event;
+ union {XEvent general; XVirtualEvent virtual;} event;
memset(&event, 0, sizeof(event));
- event.xany.type = VirtualEvent;
- event.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
- event.xany.send_event = False;
- event.xany.window = Tk_WindowId(textPtr->tkwin);
- event.xany.display = Tk_Display(textPtr->tkwin);
- ((XVirtualEvent *) &event)->name = Tk_GetUid("Selection");
- Tk_HandleEvent(&event);
+ event.general.xany.type = VirtualEvent;
+ event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
+ event.general.xany.send_event = False;
+ event.general.xany.window = Tk_WindowId(textPtr->tkwin);
+ event.general.xany.display = Tk_Display(textPtr->tkwin);
+ event.virtual.name = Tk_GetUid("Selection");
+ Tk_HandleEvent(&event.general);
}
/*
@@ -5173,18 +5173,18 @@ static void
GenerateModifiedEvent(
TkText *textPtr) /* Information about text widget. */
{
- XEvent event;
+ union {XEvent general; XVirtualEvent virtual;} event;
Tk_MakeWindowExist(textPtr->tkwin);
memset(&event, 0, sizeof(event));
- event.xany.type = VirtualEvent;
- event.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
- event.xany.send_event = False;
- event.xany.window = Tk_WindowId(textPtr->tkwin);
- event.xany.display = Tk_Display(textPtr->tkwin);
- ((XVirtualEvent *) &event)->name = Tk_GetUid("Modified");
- Tk_HandleEvent(&event);
+ event.general.xany.type = VirtualEvent;
+ event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
+ event.general.xany.send_event = False;
+ event.general.xany.window = Tk_WindowId(textPtr->tkwin);
+ event.general.xany.display = Tk_Display(textPtr->tkwin);
+ event.virtual.name = Tk_GetUid("Modified");
+ Tk_HandleEvent(&event.general);
}
/*