summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-01-29 12:41:11 (GMT)
committernijtmans <nijtmans>2010-01-29 12:41:11 (GMT)
commit72a2e7f509b932f6409e5e2e2e39dfde6da89897 (patch)
tree77377fb3841d63142de26c8498d841817d531636 /generic/ttk
parent8653f8ec25290721bc6fac2a9c68bbff0a4c4eb3 (diff)
downloadtk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.zip
tk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.tar.gz
tk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.tar.bz2
Fix various gcc-4.4 warnings and formatting, all
backported from HEAD.
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}
};
/*------------------------------------------------------------------------