[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Patches for several bugs
From: "Sander van Leeuwen" <sandervl () xs4all ! nl>
Date: 2001-12-26 11:29:45
[Download RAW message or body]
Hi,
Here are the bug fixes I promised. There are more, but I can post those at a later \
time.
- controls\button.c
CB_Paint, line 806
hBrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, (LPARAM)hwnd );
if (!hBrush) /* did the app forget to call defwindowproc ? */
hBrush = DefWindowProcW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, \
(LPARAM)hwnd );
-> (Auto)Check, (Auto)Radio & (Auto)3State buttons send WM_CTLCOLORSTATIC instead \
of WM_CTLCOLORBTN (verified in NT4) (fixes opening dialog buttons in Opera 6 (choose \
interface))
- dll\user32\text.c
TEXT_GrayString, line 499
if(!hdc) {
DeleteDC(memdc);
return FALSE;
}
-> DC leak
- COMCTL32: Comboex, rebar, tooltips, toolbar: NEVER delete the font object received \
by WM_SETFONT
-> See attached diff files for comboex, rebar & toolbar. Our tooltips has too many \
differences for diff to produce usable output, but the changes are similar to the \
other three.
- COMCTL32: Tooltips: wrong COMCTL32_Free calls
-> 4 calls with wrong pointer: COMCTL32_Free(&lpttsi);
should be COMCTL32_Free(lpttsi);
- user32: frame tracking
* - Only draw changed track frame instead of clearing the old one and
* drawing the new one (less flickering)
* - Send WM_MOVING when moving a window
* - Send WM_SIZING only when sizing a window
* - Fixed handling of rectangles changed by WM_SIZING/MOVING
-> Can't easily produce diff file. Too many changes. (check \
src\user32\wintrack.cpp in our CVS tree)
- USER32: groupbox redrawing fixes
-> I am not 100% sure the same happens in Wine, but it looks like that.
When an application changes the font or the text of a groupbox (smaller font \
or fewer characters), then
the old text has to be erase properly or else you'll still see part of it.
If I remember correctly, that could be seen in Opera 5.12 (property dialogs)
-> Again, too many changes to produce a diff file. (check src\user32\button.cpp, \
BUTTON_SetText & BUTTON_SetFont)
- USER32: static control
-> our version supports more styles (SS_CENTERIMAGE, SS_REALSIZEIMAGE) and \
features (SS_ENHMETAFILE) (src\user32\static.cpp)
Sander
["comboex.diff" (application/octet-stream)]
--- comboex.c Wed Nov 7 20:45:32 2001
+++ comboex.cn Wed Dec 26 11:26:32 2001
@@ -120,6 +120,7 @@
DWORD dwExtStyle;
INT selected; /* index of selected item */
DWORD flags; /* WINE internal flags */
+ HFONT hDefaultFont;
HFONT font;
INT nb_items; /* Number of items */
BOOL bUnicode; /* TRUE if this window is Unicode */
@@ -1209,7 +1210,7 @@
if (!infoPtr->font) {
SystemParametersInfoA (SPI_GETICONTITLELOGFONT, sizeof(mylogfont),
&mylogfont, 0);
- infoPtr->font = CreateFontIndirectA (&mylogfont);
+ infoPtr->font = infoPtr->hDefaultFont = CreateFontIndirectA (&mylogfont);
}
SendMessageW (infoPtr->hwndCombo, WM_SETFONT, (WPARAM)infoPtr->font, 0);
if (infoPtr->hwndEdit) {
@@ -1750,7 +1751,7 @@
}
}
- DeleteObject (infoPtr->font);
+ if (infoPtr->hDefaultFont) DeleteObject (infoPtr->hDefaultFont);
/* free comboex info data */
COMCTL32_Free (infoPtr);
["rebar.diff" (application/octet-stream)]
--- rebar.c Sun Sep 9 22:15:28 2001
+++ rebar.cn Wed Dec 26 11:32:10 2001
@@ -200,6 +200,7 @@
HWND hwndSelf; /* handle of REBAR window itself */
HWND hwndToolTip; /* handle to the tool tip control */
HWND hwndNotify; /* notification window (parent) */
+ HFONT hDefaultFont;
HFONT hFont; /* handle to the rebar's font */
SIZE imageSize; /* image size (image list) */
DWORD dwStyle; /* window style */
@@ -3624,7 +3625,7 @@
DeleteObject (infoPtr->hcurHorz);
DeleteObject (infoPtr->hcurVert);
DeleteObject (infoPtr->hcurDrag);
- DeleteObject (infoPtr->hFont);
+ if(infoPtr->hDefaultFont) DeleteObject (infoPtr->hDefaultFont);
SetWindowLongA (infoPtr->hwndSelf, 0, 0);
/* free rebar info data */
@@ -3834,7 +3835,7 @@
}
tfont = CreateFontIndirectA (&ncm.lfCaptionFont);
if (tfont) {
- infoPtr->hFont = tfont;
+ infoPtr->hFont = infoPtr->hDefaultFont = tfont;
}
/* native does:
["toolbar.diff" (application/octet-stream)]
--- toolbar.c Sat Dec 15 10:54:10 2001
+++ toolbar.cn Wed Dec 26 11:34:58 2001
@@ -95,6 +95,7 @@
INT nButtonDown;
INT nOldHit;
INT nHotItem; /* index of the "hot" item */
+ HFONT hDefaultFont;
HFONT hFont; /* text font */
HIMAGELIST himlInt; /* image list created internally */
HIMAGELIST himlDef; /* default image list */
@@ -4048,7 +4049,7 @@
infoPtr->hwndSelf = hwnd;
SystemParametersInfoA (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
- infoPtr->hFont = CreateFontIndirectA (&logFont);
+ infoPtr->hFont = infoPtr->hDefaultFont = CreateFontIndirectA (&logFont);
if (dwStyle & TBSTYLE_TOOLTIPS) {
/* Create tooltip control */
@@ -4106,7 +4107,7 @@
/* delete default font */
if (infoPtr->hFont)
- DeleteObject (infoPtr->hFont);
+ DeleteObject (infoPtr->hDefaultFont);
/* free toolbar info data */
COMCTL32_Free (infoPtr);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic