diff options
author | mdejong <mdejong> | 2003-12-28 05:04:17 (GMT) |
---|---|---|
committer | mdejong <mdejong> | 2003-12-28 05:04:17 (GMT) |
commit | 557362d55d1b30b7df5d4fc45b30f159f88dc7b6 (patch) | |
tree | d261a699492f0fd2c414f40f67a6647259ebb19a /win | |
parent | 31c8cfb4eb684b0c2899f7d8093288cfb46fe8c4 (diff) | |
download | tk-557362d55d1b30b7df5d4fc45b30f159f88dc7b6.zip tk-557362d55d1b30b7df5d4fc45b30f159f88dc7b6.tar.gz tk-557362d55d1b30b7df5d4fc45b30f159f88dc7b6.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')
-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); |