summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
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");