summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-03-12 13:02:36 (GMT)
committernijtmans <nijtmans>2010-03-12 13:02:36 (GMT)
commit09e7420953486a519df9134a807991d1d3118424 (patch)
treebb6ddc1254faf5843d0d0c100b1065c508dd0302 /win/tkWinMenu.c
parenteef29d4690c8a49bd7caf607862dd4de0dfdf128 (diff)
downloadtk-09e7420953486a519df9134a807991d1d3118424.zip
tk-09e7420953486a519df9134a807991d1d3118424.tar.gz
tk-09e7420953486a519df9134a807991d1d3118424.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.c16
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");