summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk')
-rw-r--r--generic/ttk/ttkInit.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c
index c0d930a..6e9192b 100644
--- a/generic/ttk/ttkInit.c
+++ b/generic/ttk/ttkInit.c
@@ -1,4 +1,4 @@
-/* $Id: ttkInit.c,v 1.7 2007/12/13 15:26:26 dgp Exp $
+/* $Id: ttkInit.c,v 1.7.2.1 2010/01/29 12:41:12 nijtmans Exp $
* Copyright (c) 2003, Joe English
*
* Ttk package: initialization routine and miscellaneous utilities.
@@ -114,17 +114,17 @@ void TtkCheckStateOption(WidgetCore *corePtr, Tcl_Obj *objPtr)
*/
void TtkSendVirtualEvent(Tk_Window tgtWin, 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(tgtWin));
- event.xany.send_event = False;
- event.xany.window = Tk_WindowId(tgtWin);
- event.xany.display = Tk_Display(tgtWin);
- ((XVirtualEvent *) &event)->name = Tk_GetUid(eventName);
-
- Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL);
+ event.general.xany.type = VirtualEvent;
+ event.general.xany.serial = NextRequest(Tk_Display(tgtWin));
+ event.general.xany.send_event = False;
+ event.general.xany.window = Tk_WindowId(tgtWin);
+ event.general.xany.display = Tk_Display(tgtWin);
+ event.virtual.name = Tk_GetUid(eventName);
+
+ Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL);
}
/* TtkEnumerateOptions, TtkGetOptionValue --
@@ -185,7 +185,7 @@ Tk_OptionSpec ttkCoreOptionSpecs[] =
Tk_Offset(WidgetCore,styleObj), -1, 0,0,STYLE_CHANGED},
{TK_OPTION_STRING, "-class", "", "", NULL,
Tk_Offset(WidgetCore,classObj), -1, 0,0,READONLY_OPTION},
- {TK_OPTION_END}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
/*------------------------------------------------------------------------