diff options
author | nijtmans <nijtmans> | 2010-03-12 13:02:36 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-03-12 13:02:36 (GMT) |
commit | 36115ec36c8767cb3043dbbd1846c108ab788e8a (patch) | |
tree | bb6ddc1254faf5843d0d0c100b1065c508dd0302 /win/tkWinMenu.c | |
parent | 94533b37310c2295093ae8d6f8849f99fd783c92 (diff) | |
download | tk-36115ec36c8767cb3043dbbd1846c108ab788e8a.zip tk-36115ec36c8767cb3043dbbd1846c108ab788e8a.tar.gz tk-36115ec36c8767cb3043dbbd1846c108ab788e8a.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"); |