diff options
author | mdejong <mdejong> | 2003-12-28 05:04:17 (GMT) |
---|---|---|
committer | mdejong <mdejong> | 2003-12-28 05:04:17 (GMT) |
commit | 5ceafe2f3b7a0fff94c5a8b37a62780bb9d6c5dd (patch) | |
tree | d261a699492f0fd2c414f40f67a6647259ebb19a /win/tkWinMenu.c | |
parent | 6650c83d3f65ad67a8d4019d854f1b12173b977a (diff) | |
download | tk-5ceafe2f3b7a0fff94c5a8b37a62780bb9d6c5dd.zip tk-5ceafe2f3b7a0fff94c5a8b37a62780bb9d6c5dd.tar.gz tk-5ceafe2f3b7a0fff94c5a8b37a62780bb9d6c5dd.tar.bz2 |
* win/tkWinMenu.c (DrawWindowsSystemBitmap):
Fix a strange Win32 bug where the logical
coordinates returned by a call to DPtoLP
are wrong the first time a menu is posted.
This bug manifested itself by drawing the
bitmap in the wrong place in a menu.
The fix was to pass the newly created DC
instead of the DC from the window.
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r-- | win/tkWinMenu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index c15cd4c..1b48d25 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -9,7 +9,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.28 2003/12/26 22:29:07 mdejong Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.29 2003/12/28 05:04:18 mdejong Exp $ */ #define OEMRESOURCE @@ -1471,7 +1471,7 @@ DrawWindowsSystemBitmap(display, drawable, gc, rectPtr, bitmapID, alignFlags) GetObject(bitmap, sizeof(BITMAP), &bm); ptSize.x = bm.bmWidth; ptSize.y = bm.bmHeight; - DPtoLP(hdc, &ptSize, 1); + DPtoLP(scratchDC, &ptSize, 1); ptOrg.y = ptOrg.x = 0; DPtoLP(scratchDC, &ptOrg, 1); |