diff options
author | nijtmans <nijtmans> | 2010-03-12 13:02:36 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-03-12 13:02:36 (GMT) |
commit | d7a3a30fcca63bd4ca7f1f5dce8e562f60880620 (patch) | |
tree | bb6ddc1254faf5843d0d0c100b1065c508dd0302 /win/tkWinMenu.c | |
parent | a12870e9bf85f2a88798b8ed957bfded32467340 (diff) | |
download | tk-d7a3a30fcca63bd4ca7f1f5dce8e562f60880620.zip tk-d7a3a30fcca63bd4ca7f1f5dce8e562f60880620.tar.gz tk-d7a3a30fcca63bd4ca7f1f5dce8e562f60880620.tar.bz2 |
[Bug 2956548] TkpButtonSetDefaults only initializes one button type
Fix various gcc warnings, all backported from Tk 8.6
VC6++ does not have SPI_SETKEYBOARDCUES
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r-- | win/tkWinMenu.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 44f144e..5cd4b3f 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.59.2.5 2010/01/03 20:03:55 patthoyts Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.59.2.6 2010/03/12 13:02:36 nijtmans Exp $ */ #define WINVER 0x0500 /* Requires Windows 2K definitions */ @@ -2503,9 +2503,9 @@ TkpDrawMenuEntry( int adjustedHeight = height - 2 * padY; TkWinDrawable memWinDraw; TkWinDCState dcState; - HBITMAP oldBitmap; + HBITMAP oldBitmap = NULL; Drawable d; - HDC memDc, menuDc; + HDC memDc = NULL, menuDc = NULL; /* * If the menu entry includes an image then draw the entry into a @@ -2977,8 +2977,7 @@ MenuSelectEvent( TkMenu *menuPtr) /* the menu we have selected. */ { XVirtualEvent event; - POINTS rootPoint; - DWORD msgPos; + union {DWORD msgpos; POINTS point;} root; event.type = VirtualEvent; event.serial = menuPtr->display->request; @@ -2990,10 +2989,9 @@ MenuSelectEvent( event.subwindow = None; event.time = TkpGetMS(); - msgPos = GetMessagePos(); - rootPoint = MAKEPOINTS(msgPos); - event.x_root = rootPoint.x; - event.y_root = rootPoint.y; + root.msgpos = GetMessagePos(); + event.x_root = root.point.x; + event.y_root = root.point.y; event.state = TkWinGetModifierState(); event.same_screen = 1; event.name = Tk_GetUid("MenuSelect"); |