Bugzilla – Attachment 1853 Details for
Bug 6061
1С8: некорректная отрисовка окна выбора базы в текущем eterhack
EN
|
RU
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Патч, откатывающий user32 до pure
0001-user32-revert-to-pure.patch (text/plain), 88.82 KB, created by
Виталий Перов
on 2010-11-18 03:58:26 MSK
(
hide
)
Description:
Патч, откатывающий user32 до pure
Filename:
MIME Type:
Creator:
Виталий Перов
Created:
2010-11-18 03:58:26 MSK
Size:
88.82 KB
patch
obsolete
>From 827c76a1a50b594750b05ae1b4d3b821e2276b41 Mon Sep 17 00:00:00 2001 >From: Vitaly Perov <vitperov@etersoft.ru> >Date: Thu, 7 Oct 2010 16:23:28 +0400 >Subject: [PATCH] user32: revert to pure > >--- > dlls/user32/controls.h | 2 +- > dlls/user32/defwnd.c | 28 ++++-- > dlls/user32/dialog.c | 7 +- > dlls/user32/driver.c | 12 -- > dlls/user32/edit.c | 28 +---- > dlls/user32/focus.c | 47 ++------- > dlls/user32/icontitle.c | 1 - > dlls/user32/input.c | 8 -- > dlls/user32/listbox.c | 8 -- > dlls/user32/lstr.c | 33 ------ > dlls/user32/mdi.c | 110 ++++---------------- > dlls/user32/menu.c | 58 +++-------- > dlls/user32/message.c | 40 +------- > dlls/user32/misc.c | 2 +- > dlls/user32/msgbox.c | 15 +--- > dlls/user32/nonclient.c | 24 +++-- > dlls/user32/painting.c | 34 +------ > dlls/user32/scroll.c | 1 - > dlls/user32/static.c | 16 +-- > dlls/user32/sysparams.c | 39 +------- > dlls/user32/tests/edit.c | 230 ----------------------------------------- > dlls/user32/tests/sysparams.c | 84 --------------- > dlls/user32/text.c | 28 +----- > dlls/user32/user_private.h | 1 - > dlls/user32/win.c | 84 ++------------- > dlls/user32/winpos.c | 119 +++++---------------- > dlls/user32/winproc.c | 66 +------------ > 27 files changed, 139 insertions(+), 986 deletions(-) > >diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h >index fd612dc..065daeb 100644 >--- a/dlls/user32/controls.h >+++ b/dlls/user32/controls.h >@@ -173,7 +173,7 @@ extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) > extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN; > extern LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; > extern LRESULT NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; >-extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc ) DECLSPEC_HIDDEN; >+extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down ) DECLSPEC_HIDDEN; > extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect ) DECLSPEC_HIDDEN; > > /* scrollbar */ >diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c >index b1e1cf5..226b604 100644 >--- a/dlls/user32/defwnd.c >+++ b/dlls/user32/defwnd.c >@@ -203,18 +203,13 @@ static void DEFWND_Print( HWND hwnd, HDC hdc, ULONG uFlags) > * Unimplemented flags. > */ > if ( (uFlags & PRF_CHILDREN) || >- (uFlags & PRF_OWNED) ) >+ (uFlags & PRF_OWNED) || >+ (uFlags & PRF_NONCLIENT) ) > { > WARN("WM_PRINT message with unsupported flags\n"); > } > > /* >- * Nonclient area >- */ >- if ( uFlags & PRF_NONCLIENT) >- SendMessageW(hwnd, WM_NCPAINT, 0, 0); >- >- /* > * Background > */ > if ( uFlags & PRF_ERASEBKGND) >@@ -430,7 +425,22 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa > PAINTSTRUCT ps; > HDC hdc = BeginPaint( hwnd, &ps ); > if( hdc ) >+ { >+ HICON hIcon; >+ if (IsIconic(hwnd) && ((hIcon = (HICON)GetClassLongPtrW( hwnd, GCLP_HICON))) ) >+ { >+ RECT rc; >+ int x, y; >+ >+ GetClientRect( hwnd, &rc ); >+ x = (rc.right - rc.left - GetSystemMetrics(SM_CXICON))/2; >+ y = (rc.bottom - rc.top - GetSystemMetrics(SM_CYICON))/2; >+ TRACE("Painting class icon: vis rect=(%s)\n", >+ wine_dbgstr_rect(&ps.rcPaint)); >+ DrawIcon( hdc, x, y, hIcon ); >+ } > EndPaint( hwnd, &ps ); >+ } > return 0; > } > >@@ -515,7 +525,9 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa > * give the parent first chance to set the cursor */ > if ((LOWORD(lParam) < HTSIZEFIRST) || (LOWORD(lParam) > HTSIZELAST)) > { >- if (SendMessageW(GetParent(hwnd), WM_SETCURSOR, wParam, lParam)) return TRUE; >+ HWND parent = GetParent( hwnd ); >+ if (parent != GetDesktopWindow() && >+ SendMessageW( parent, WM_SETCURSOR, wParam, lParam )) return TRUE; > } > } > NC_HandleSetCursor( hwnd, wParam, lParam ); >diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c >index 512b903..052fbff 100644 >--- a/dlls/user32/dialog.c >+++ b/dlls/user32/dialog.c >@@ -902,6 +902,7 @@ INT_PTR WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance, LPCDLGTEMPLATEW temp > */ > BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval ) > { >+ BOOL wasEnabled = TRUE; > DIALOGINFO * dlgInfo; > HWND owner; > >@@ -914,8 +915,9 @@ BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval ) > } > dlgInfo->idResult = retval; > dlgInfo->flags |= DF_END; >+ wasEnabled = (dlgInfo->flags & DF_OWNERENABLED); > >- if (owner = GetWindow( hwnd, GW_OWNER )) >+ if (wasEnabled && (owner = GetWindow( hwnd, GW_OWNER ))) > DIALOG_EnableOwner( owner ); > > /* Windows sets the focus to the dialog itself in EndDialog */ >@@ -953,9 +955,6 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM wParam ) > if ((style & (WS_VISIBLE | WS_DISABLED)) == WS_VISIBLE) > { > dlgCode = SendMessageW( hwndControl, WM_GETDLGCODE, 0, 0 ); >- if (dlgCode & DLGC_WANTCHARS) >- break; /* prevent endless loop */ >- > if ( (dlgCode & (DLGC_BUTTON | DLGC_STATIC)) && > GetWindowTextW( hwndControl, buffer, sizeof(buffer)/sizeof(WCHAR) )) > { >diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c >index e762956..f2f9892 100644 >--- a/dlls/user32/driver.c >+++ b/dlls/user32/driver.c >@@ -115,7 +115,6 @@ static const USER_DRIVER *load_driver(void) > GET_USER_FUNC(ScrollDC); > GET_USER_FUNC(SetCapture); > GET_USER_FUNC(SetFocus); >- GET_USER_FUNC(DropWindow); > GET_USER_FUNC(SetLayeredWindowAttributes); > GET_USER_FUNC(SetParent); > GET_USER_FUNC(SetWindowRgn); >@@ -386,10 +385,6 @@ static void CDECL nulldrv_SetFocus( HWND hwnd ) > { > } > >-static void CDECL nulldrv_DropWindow( HWND hwnd ) >-{ >-} >- > static void CDECL nulldrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ) > { > } >@@ -493,7 +488,6 @@ static USER_DRIVER null_driver = > nulldrv_ScrollDC, > nulldrv_SetCapture, > nulldrv_SetFocus, >- nulldrv_DropWindow, > nulldrv_SetLayeredWindowAttributes, > nulldrv_SetParent, > nulldrv_SetWindowRgn, >@@ -735,11 +729,6 @@ static void CDECL loaderdrv_SetFocus( HWND hwnd ) > load_driver()->pSetFocus( hwnd ); > } > >-static void CDECL loaderdrv_DropWindow( HWND hwnd ) >-{ >- load_driver()->pDropWindow( hwnd ); >-} >- > static void CDECL loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ) > { > load_driver()->pSetLayeredWindowAttributes( hwnd, key, alpha, flags ); >@@ -852,7 +841,6 @@ static USER_DRIVER lazy_load_driver = > loaderdrv_ScrollDC, > loaderdrv_SetCapture, > loaderdrv_SetFocus, >- loaderdrv_DropWindow, > loaderdrv_SetLayeredWindowAttributes, > loaderdrv_SetParent, > loaderdrv_SetWindowRgn, >diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c >index c4de481..8f59d95 100644 >--- a/dlls/user32/edit.c >+++ b/dlls/user32/edit.c >@@ -234,23 +234,13 @@ static HBRUSH EDIT_NotifyCtlColor(EDITSTATE *es, HDC hdc) > HBRUSH hbrush; > UINT msg; > >- if (GetParent(es->hwndSelf) == GetDesktopWindow()) >- { >- hbrush = (HBRUSH)DefWindowProcW(es->hwndSelf, WM_CTLCOLOREDIT, (WPARAM)hdc, (LPARAM)es->hwndSelf); >- return hbrush; >- } >- > if ( get_app_version() >= 0x40000 && (!es->bEnableState || (es->style & ES_READONLY))) > msg = WM_CTLCOLORSTATIC; > else > msg = WM_CTLCOLOREDIT; > >- /* We must send all notifies to es->hwndParent. >- * If es->hwndParent don't response, we call >- * DefWindowProcW of the current parent. >- */ >- >- hbrush = (HBRUSH)SendMessageW(es->hwndParent, msg, (WPARAM)hdc, (LPARAM)es->hwndSelf); >+ /* why do we notify to es->hwndParent, and we send this one to GetParent()? */ >+ hbrush = (HBRUSH)SendMessageW(GetParent(es->hwndSelf), msg, (WPARAM)hdc, (LPARAM)es->hwndSelf); > if (!hbrush) > hbrush = (HBRUSH)DefWindowProcW(GetParent(es->hwndSelf), msg, (WPARAM)hdc, (LPARAM)es->hwndSelf); > return hbrush; >@@ -2157,8 +2147,7 @@ static void EDIT_AdjustFormatRect(EDITSTATE *es) > if ((es->style & ES_MULTILINE) && !(es->style & ES_AUTOHSCROLL)) > EDIT_BuildLineDefs_ML(es, 0, get_text_length(es), 0, NULL); > >- if (GetFocus() == es->hwndSelf) >- EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP); >+ EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP); > } > > >@@ -2711,8 +2700,8 @@ static void EDIT_EM_SetMargins(EDITSTATE *es, INT action, > int min_size; > RECT rc; > /* This must be calculated more exactly! But how? */ >- default_left_margin = tm.tmAveCharWidth / 4; >- default_right_margin = tm.tmAveCharWidth / 4; >+ default_left_margin = tm.tmAveCharWidth / 2; >+ default_right_margin = tm.tmAveCharWidth / 2; > min_size = calc_min_set_margin_size(dc, default_left_margin, default_right_margin); > GetClientRect(es->hwndSelf, &rc); > if(rc.right - rc.left < min_size) { >@@ -3354,12 +3343,6 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) > */ > static LRESULT EDIT_WM_KillFocus(EDITSTATE *es) > { >- if( GetCapture() == es->hwndSelf ) >- { >- ReleaseCapture(); >- es->bCaptureState = FALSE; >- } >- > es->flags &= ~EF_FOCUSED; > DestroyCaret(); > if(!(es->style & ES_NOHIDESEL)) >@@ -4883,7 +4866,6 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B > > case WM_SETTEXT: > EDIT_WM_SetText(es, (LPCWSTR)lParam, unicode); >- DefWindowProcT(hwnd, msg, wParam, lParam, unicode); > result = TRUE; > break; > >diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c >index 89387fa..f086584 100644 >--- a/dlls/user32/focus.c >+++ b/dlls/user32/focus.c >@@ -33,9 +33,6 @@ > #include "wine/server.h" > #include "wine/debug.h" > >-#define ETERSOFT_FUNC_GETWM >-#include "wine/etersoft.h" >- > WINE_DEFAULT_DEBUG_CHANNEL(win); > > >@@ -85,19 +82,6 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) > > if (previous == hwnd) > { >- LOADETER_FUNC(etersoft_1version); >- if ( etersoft_1version && (etersoft_1version() == 8) ) >- { >- if (GetWindowLongW( hwnd, GWL_STYLE) & WS_POPUP) >- { >- /* Eterbug #2941 */ >- /* Skip the popup windows raising for some styles */ >- if (GetWindowLongW(hwnd, GWL_STYLE) != >- (WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN)) >- set_focus_window(hwnd); >- } >- } >- > if (prev) *prev = hwnd; > return TRUE; > } >@@ -131,23 +115,6 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) > if (SendMessageW( hwnd, WM_QUERYNEWPALETTE, 0, 0 )) > SendMessageTimeoutW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0, > SMTO_ABORTIFHUNG, 2000, NULL ); >- >- /* This hack is needed to solve >- * eterbug #1837 in Gnome only >- */ >- LOADETER_FUNC(etersoft_getwm) >- if (etersoft_getwm() == 2) >- { >- LOADETER_FUNC(etersoft_1version); >- if ( etersoft_1version && ((etersoft_1version() == 8) || (etersoft_1version() == 7)) ) >- { >- if((!GetPropA( hwnd, "__wine_x11_managed" ) && (etersoft_1version() == 8)) >- || (GetWindowLongW( hwnd, GWL_STYLE ) & WS_POPUP)) >- SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE ); >- } >- else >- SetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE ); >- } > if (!IsWindow(hwnd)) return FALSE; > } > >@@ -231,10 +198,7 @@ static BOOL set_foreground_window( HWND hwnd, BOOL mouse ) > if (send_msg_old) /* old window belongs to other thread */ > SendNotifyMessageW( previous, WM_WINE_SETACTIVEWINDOW, 0, 0 ); > else if (send_msg_new) /* old window belongs to us but new one to other thread */ >- { >- USER_Driver->pDropWindow(GetActiveWindow()); > ret = set_active_window( 0, NULL, mouse, TRUE ); >- } > > if (send_msg_new) /* new window belongs to other thread */ > SendNotifyMessageW( hwnd, WM_WINE_SETACTIVEWINDOW, (WPARAM)hwnd, 0 ); >@@ -309,8 +273,15 @@ HWND WINAPI SetFocus( HWND hwnd ) > /* call hooks */ > if (HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)hwnd, (LPARAM)previous, TRUE )) return 0; > >- /* Do not change focus if the window is no longer active */ >- if (hwndTop != GetActiveWindow()) return 0; >+ /* activate hwndTop if needed. */ >+ if (hwndTop != GetActiveWindow()) >+ { >+ if (!set_active_window( hwndTop, NULL, FALSE, FALSE )) return 0; >+ if (!IsWindow( hwnd )) return 0; /* Abort if window destroyed */ >+ >+ /* Do not change focus if the window is no longer active */ >+ if (hwndTop != GetActiveWindow()) return 0; >+ } > } > else /* NULL hwnd passed in */ > { >diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c >index a9b3986..04f0c69 100644 >--- a/dlls/user32/icontitle.c >+++ b/dlls/user32/icontitle.c >@@ -214,7 +214,6 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, > case WM_NCHITTEST: > return HTCAPTION; > case WM_NCMOUSEMOVE: >- case WM_NCLBUTTONDOWN: > case WM_NCLBUTTONDBLCLK: > return SendMessageW( owner, msg, wParam, lParam ); > case WM_ACTIVATE: >diff --git a/dlls/user32/input.c b/dlls/user32/input.c >index 2f36834..6e1e459 100644 >--- a/dlls/user32/input.c >+++ b/dlls/user32/input.c >@@ -47,9 +47,6 @@ > #include "wine/debug.h" > #include "wine/unicode.h" > >-#define ETERSOFT_FUNC_KEY >-#include "wine/etersoft.h" >- > WINE_DEFAULT_DEBUG_CHANNEL(win); > WINE_DECLARE_DEBUG_CHANNEL(keyboard); > >@@ -502,11 +499,6 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetKeyState(INT vkey) > if (!wine_server_call( req )) retval = (signed char)reply->state; > } > SERVER_END_REQ; >- >- LOADETER_FUNC(etersoft_fixkey); >- if (etersoft_fixkey) >- etersoft_fixkey(vkey); >- > TRACE("key (0x%x) -> %x\n", vkey, retval); > return retval; > } >diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c >index b6b9838..6bf24a7 100644 >--- a/dlls/user32/listbox.c >+++ b/dlls/user32/listbox.c >@@ -2963,14 +2963,6 @@ LRESULT ListBoxWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam > return LISTBOX_Destroy( descr ); > > case WM_ENABLE: >- { >- /* Eterbug #4222 >- Hack not to invalidate listbox in case it's parent is also listbox */ >- char class[80]; >- GetClassNameA( GetParent(hwnd), class, sizeof class ); >- if(!strcmp( class, "ListBox" )) >- return 0; >- } > InvalidateRect( descr->self, NULL, TRUE ); > return 0; > >diff --git a/dlls/user32/lstr.c b/dlls/user32/lstr.c >index 6c2e28d..25a935a 100644 >--- a/dlls/user32/lstr.c >+++ b/dlls/user32/lstr.c >@@ -37,11 +37,6 @@ > #include "wine/exception.h" > #include "wine/unicode.h" > >-#define ETERSOFT_FUNC_LSTR >-#include "wine/etersoft.h" >- >-WINE_DEFAULT_DEBUG_CHANNEL(string); >- > > /*********************************************************************** > * CharNextA (USER32.@) >@@ -383,13 +378,6 @@ DWORD WINAPI CharUpperBuffW( LPWSTR str, DWORD len ) > BOOL WINAPI IsCharLowerA(CHAR x) > { > WCHAR wch; >- >- LOADETER_FUNC(etersoft_ischarlower); >- if (etersoft_ischarlower) >- { >- int res = etersoft_ischarlower(GetACP(), x); >- if (res >= 0) return res; >- } > MultiByteToWideChar(CP_ACP, 0, &x, 1, &wch, 1); > return IsCharLowerW(wch); > } >@@ -411,13 +399,6 @@ BOOL WINAPI IsCharLowerW(WCHAR x) > BOOL WINAPI IsCharUpperA(CHAR x) > { > WCHAR wch; >- >- LOADETER_FUNC(etersoft_ischarupper); >- if (etersoft_ischarupper) >- { >- int res = etersoft_ischarupper(GetACP(), x); >- if (res >= 0) return res; >- } > MultiByteToWideChar(CP_ACP, 0, &x, 1, &wch, 1); > return IsCharUpperW(wch); > } >@@ -439,13 +420,6 @@ BOOL WINAPI IsCharUpperW(WCHAR x) > BOOL WINAPI IsCharAlphaNumericA(CHAR x) > { > WCHAR wch; >- >- LOADETER_FUNC(etersoft_ischaralnum); >- if (etersoft_ischaralnum) >- { >- int res = etersoft_ischaralnum(GetACP(), x); >- if (res >= 0) return res; >- } > MultiByteToWideChar(CP_ACP, 0, &x, 1, &wch, 1); > return IsCharAlphaNumericW(wch); > } >@@ -467,13 +441,6 @@ BOOL WINAPI IsCharAlphaNumericW(WCHAR x) > BOOL WINAPI IsCharAlphaA(CHAR x) > { > WCHAR wch; >- >- LOADETER_FUNC(etersoft_ischaralpha); >- if (etersoft_ischaralpha) >- { >- int res = etersoft_ischaralpha(GetACP(), x); >- if (res >= 0) return res; >- } > MultiByteToWideChar(CP_ACP, 0, &x, 1, &wch, 1); > return IsCharAlphaW(wch); > } >diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c >index f700f86..bcaef76 100644 >--- a/dlls/user32/mdi.c >+++ b/dlls/user32/mdi.c >@@ -112,7 +112,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mdi); > #define IDS_MDI_MOREWINDOWS 13 > > #define MDIF_NEEDUPDATE 0x0001 >-#define MDIF_IDLE 0x0002 > > typedef struct > { >@@ -234,7 +233,7 @@ static BOOL is_close_enabled(HWND hwnd, HMENU hSysMenu) > * returns "activatable" child different from the current or zero > */ > static HWND MDI_GetWindow(MDICLIENTINFO *clientInfo, HWND hWnd, BOOL bNext, >- DWORD dwStyleMask, BOOL bStatic ) >+ DWORD dwStyleMask ) > { > int i; > HWND *list; >@@ -243,13 +242,7 @@ static HWND MDI_GetWindow(MDICLIENTINFO *clientInfo, HWND hWnd, BOOL bNext, > dwStyleMask |= WS_DISABLED | WS_VISIBLE; > if( !hWnd ) hWnd = clientInfo->hwndActiveChild; > >- if(bStatic) >- { >- if (!(list = clientInfo->child)) return 0; >- } >- else >- if (!(list = WIN_ListChildren( GetParent(hWnd) ))) return 0; >- >+ if (!(list = WIN_ListChildren( GetParent(hWnd) ))) return 0; > i = 0; > /* start from next after hWnd */ > while (list[i] && list[i] != hWnd) i++; >@@ -259,12 +252,6 @@ static HWND MDI_GetWindow(MDICLIENTINFO *clientInfo, HWND hWnd, BOOL bNext, > { > if (GetWindow( list[i], GW_OWNER )) continue; > if ((GetWindowLongW( list[i], GWL_STYLE ) & dwStyleMask) != WS_VISIBLE) continue; >- if (hWnd == list[i]) continue; >- >- /* Check the case then MDI child window have >- * other attached child window >- */ >- if (GetParent( hWnd ) != GetParent( list[i] )) continue; > last = list[i]; > if (bNext) goto found; > } >@@ -277,8 +264,7 @@ static HWND MDI_GetWindow(MDICLIENTINFO *clientInfo, HWND hWnd, BOOL bNext, > if (bNext) goto found; > } > found: >- if(!bStatic) >- HeapFree( GetProcessHeap(), 0, list ); >+ HeapFree( GetProcessHeap(), 0, list ); > return last; > } > >@@ -538,21 +524,18 @@ static void MDI_SwitchActiveChild( MDICLIENTINFO *ci, HWND hwndTo, BOOL activate > > if (was_zoomed) > { >- ci->hwndChildMaximized = hwndTo; >- /* maximize new MDI child */ >- ShowWindow( hwndTo, SW_MAXIMIZE ); >- /* activate new MDI child */ >- SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE| (activate ? 0 : SWP_NOACTIVATE) ); >- > /* restore old MDI child */ > SendMessageW( hwndPrev, WM_SETREDRAW, FALSE, 0 ); >- ShowWindow( hwndPrev, SW_SHOWNOACTIVATE ); >+ ShowWindow( hwndPrev, SW_RESTORE ); > SendMessageW( hwndPrev, WM_SETREDRAW, TRUE, 0 ); >- } >- else >- SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | (activate ? 0 : SWP_NOACTIVATE) ); > >- ci->hwndActiveChild = hwndTo; >+ /* activate new MDI child */ >+ SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); >+ /* maximize new MDI child */ >+ ShowWindow( hwndTo, SW_MAXIMIZE ); >+ } >+ /* activate new MDI child */ >+ SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | (activate ? 0 : SWP_NOACTIVATE) ); > } > } > >@@ -569,7 +552,7 @@ static LRESULT MDIDestroyChild( HWND client, MDICLIENTINFO *ci, > > if( child == ci->hwndActiveChild ) > { >- HWND next = MDI_GetWindow(ci, child, TRUE, 0, FALSE); >+ HWND next = MDI_GetWindow(ci, child, TRUE, 0); > /* flagDestroy == 0 means we were called from WM_PARENTNOTIFY handler */ > if (flagDestroy && next) > MDI_SwitchActiveChild(ci, next, TRUE); >@@ -646,9 +629,8 @@ static LONG MDI_ChildActivate( HWND client, HWND child ) > } > > MDI_SwitchActiveChild( clientInfo, child, FALSE ); >+ clientInfo->hwndActiveChild = child; > >- if (clientInfo->hwndChildMaximized == child) >- MDI_UpdateFrameText( frame, client, FALSE, NULL ); > MDI_RefreshMenu(clientInfo); > > if( isActiveFrameWnd ) >@@ -849,14 +831,6 @@ static void MDITile( HWND client, MDICLIENTINFO *ci, WPARAM wParam ) > > /* ----------------------- Frame window ---------------------------- */ > >-/********************************************************************** >- * MDI_RefreshFrame >- */ >-static BOOL MDI_RefreshFrame( HWND frame ) >-{ >- return SetWindowPos( frame, NULL, 0, 0, 0, 0, >- SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER ); >-} > > /********************************************************************** > * MDI_AugmentFrameMenu >@@ -870,11 +844,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild ) > > TRACE("frame %p,child %p\n",frame,hChild); > >- if( !menu ) >- { >- MDI_RefreshFrame(frame); >- return 0; >- } >+ if( !menu ) return 0; > > /* create a copy of sysmenu popup and insert it into frame menu bar */ > if (!(hSysPopup = GetSystemMenu(hChild, FALSE))) >@@ -1132,7 +1102,7 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM > case WM_MDIACTIVATE: > { > if( ci->hwndActiveChild != (HWND)wParam ) >- MDI_ChildActivate( hwnd, (HWND)wParam ); >+ SetWindowPos((HWND)wParam, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE); > return 0; > } > >@@ -1170,33 +1140,8 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM > return MDIDestroyChild( hwnd, ci, WIN_GetFullHandle( (HWND)wParam ), TRUE ); > > case WM_MDIGETACTIVE: >- { >- static LPARAM prevlp,constlp; >- >- if (lParam) >- { >- /* set idle flag */ >- if((constlp && (lParam == constlp) && !prevlp) || (prevlp && (lParam ==prevlp))) >- ci->mdiFlags |= MDIF_IDLE; >- >- /* unset idle flag */ >- if(lParam != constlp) >- ci->mdiFlags &= ~MDIF_IDLE; >- >- if(!(ci->mdiFlags & MDIF_IDLE)) >- *(BOOL *)lParam = IsZoomed(ci->hwndActiveChild); >- >- prevlp = lParam; >- constlp = lParam; >- } >- else >- { >- if(!prevlp && constlp) >- constlp = 0; >- prevlp = 0; >- } >+ if (lParam) *(BOOL *)lParam = IsZoomed(ci->hwndActiveChild); > return (LRESULT)ci->hwndActiveChild; >- } > > case WM_MDIICONARRANGE: > ci->mdiFlags |= MDIF_NEEDUPDATE; >@@ -1211,8 +1156,8 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM > > case WM_MDINEXT: /* lParam != 0 means previous window */ > { >- HWND next = MDI_GetWindow( ci, WIN_GetFullHandle( (HWND)wParam ), !lParam, 0, TRUE ); >- MDI_ChildActivate( hwnd, next ); >+ HWND next = MDI_GetWindow( ci, WIN_GetFullHandle( (HWND)wParam ), !lParam, 0 ); >+ MDI_SwitchActiveChild( ci, next, TRUE ); > break; > } > >@@ -1486,7 +1431,6 @@ LRESULT WINAPI DefMDIChildProcA( HWND hwnd, UINT message, > case WM_NEXTMENU: > case WM_SYSCHAR: > case WM_DESTROY: >- case WM_ICONERASEBKGND: > return DefMDIChildProcW( hwnd, message, wParam, lParam ); > } > return DefWindowProcA(hwnd, message, wParam, lParam); >@@ -1608,7 +1552,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message, > > if( wParam == SIZE_MINIMIZED ) > { >- HWND switchTo = MDI_GetWindow( ci, hwnd, TRUE, WS_MINIMIZE, FALSE ); >+ HWND switchTo = MDI_GetWindow( ci, hwnd, TRUE, WS_MINIMIZE ); > > if (!switchTo) switchTo = hwnd; > SendMessageW( switchTo, WM_CHILDACTIVATE, 0, 0 ); >@@ -1644,27 +1588,11 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message, > } > break; > >- case WM_ICONERASEBKGND: >- { >- RECT rect; >- HDC hdc = (HDC)wParam; >- HBRUSH hbr = CreateSolidBrush( GetSysColor(COLOR_BTNFACE) ); >- GetClipBox( hdc, &rect ); >- FillRect( hdc, &rect, hbr ); >- return 1; >- } >- > case WM_DESTROY: >- { >- HWND frame = GetParent(client); >- > /* Remove itself from the Window menu */ > MDI_RefreshMenu(ci); >- if (!GetMenu(frame)) >- MDI_RefreshFrame(frame); > break; > } >- } > return DefWindowProcW(hwnd, message, wParam, lParam); > } > >diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c >index e723983..4d2edf8 100644 >--- a/dlls/user32/menu.c >+++ b/dlls/user32/menu.c >@@ -81,7 +81,6 @@ typedef struct { > LPWSTR dwTypeData; /* depends on fMask */ > HBITMAP hbmpItem; /* bitmap */ > /* ----------- Wine stuff ----------- */ >- WORD wMagic; /* Magic number */ > RECT rect; /* Item area (relative to menu window) */ > UINT xTab; /* X position of text after Tab */ > SIZE bmpsize; /* size needed for the HBMMENU_CALLBACK >@@ -319,10 +318,6 @@ static HMENU get_win_sys_menu( HWND hwnd ) > { > ret = win->hSysMenu; > WIN_ReleasePtr( win ); >- if (!MENU_GetMenu(ret)) { >- ERR("Error with win %p, sysmenu %x\n", win, ret); >- return NULL; >- } > } > return ret; > } >@@ -617,7 +612,6 @@ static MENUITEM *MENU_FindItem( HMENU *hmenu, UINT *nPos, UINT wFlags ) > if (wFlags & MF_BYPOSITION) > { > if (*nPos >= menu->nItems) return NULL; >- if (menu->items[*nPos].wMagic != MENU_MAGIC) return NULL; > return &menu->items[*nPos]; > } > else >@@ -672,22 +666,13 @@ static UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget ) > return NO_SELECTED_ITEM; > item = menu->items; > for (i = 0; i < menu->nItems; i++, item++) { >- if (item->wMagic != MENU_MAGIC) { >- ERR("Incorrect menu item %d (0x%p) for hmenu=0x%x\n", i, item, *hmenu); >- break; >- } > if(!(item->fType & MF_POPUP)) continue; > if (item->hSubMenu == hSubTarget) { > return i; > } > else { > HMENU hsubmenu = item->hSubMenu; >- UINT pos; >- if (hsubmenu == *hmenu) { >- ERR("Enter to recursion with hmenu=0x%x\n", *hmenu); >- break; >- } >- pos = MENU_FindSubMenu( &hsubmenu, hSubTarget ); >+ UINT pos = MENU_FindSubMenu( &hsubmenu, hSubTarget ); > if (pos != NO_SELECTED_ITEM) { > *hmenu = hsubmenu; > return pos; >@@ -702,10 +687,6 @@ static UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget ) > */ > static void MENU_FreeItemData( MENUITEM* item ) > { >- if (item->wMagic != MENU_MAGIC) { >- ERR("Free incorrect item 0x%p\n", item); >- return; >- } > /* delete text */ > HeapFree( GetProcessHeap(), 0, item->text ); > } >@@ -1417,10 +1398,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, > RECT bmprc; > > debug_print_menuitem("MENU_DrawMenuItem: ", lpitem, ""); >- if (!menu) { >- ERR("broken hmenu, return\n"); >- return; >- } >+ > if (!menuBar) { > BITMAP bmp; > GetObjectW( get_arrow_bitmap(), sizeof(bmp), &bmp ); >@@ -1429,7 +1407,11 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, > } > > if (lpitem->fType & MF_SYSMENU) >- return; >+ { >+ if( !IsIconic(hwnd) ) >+ NC_DrawSysButton( hwnd, hdc, lpitem->fState & (MF_HILITE | MF_MOUSESELECT) ); >+ return; >+ } > > SystemParametersInfoW (SPI_GETFLATMENU, 0, &flat_menu, 0); > bkgnd = (menuBar && flat_menu) ? COLOR_MENUBAR : COLOR_MENU; >@@ -1929,6 +1911,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id, UINT flags, > > SetWindowPos( menu->hWnd, HWND_TOPMOST, 0, 0, 0, 0, > SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE ); >+ UpdateWindow( menu->hWnd ); > return TRUE; > } > >@@ -2120,7 +2103,7 @@ static MENUITEM *MENU_InsertItem( HMENU hMenu, UINT pos, UINT flags ) > TRACE("inserting at %u by pos %u\n", pos, flags & MF_BYPOSITION); > > /* Create new items array */ >- /* Lav: Why in RemoveMenu we do HeapReAlloc and HeapAlloc here? */ >+ > newItems = HeapAlloc( GetProcessHeap(), 0, sizeof(MENUITEM) * (menu->nItems+1) ); > if (!newItems) > { >@@ -2137,8 +2120,7 @@ static MENUITEM *MENU_InsertItem( HMENU hMenu, UINT pos, UINT flags ) > } > menu->items = newItems; > menu->nItems++; >- ZeroMemory( &newItems[pos], sizeof(*newItems) ); >- newItems[pos].wMagic = MENU_MAGIC; >+ memset( &newItems[pos], 0, sizeof(*newItems) ); > menu->Height = 0; /* force size recalculate */ > return &newItems[pos]; > } >@@ -3626,7 +3608,7 @@ DWORD WINAPI CheckMenuItem( HMENU hMenu, UINT id, UINT flags ) > DWORD ret; > > if (!(item = MENU_FindItem( &hMenu, &id, flags ))) return -1; >- ret = item->fState & (MF_CHECKED | MF_UNCHECKED); >+ ret = item->fState & MF_CHECKED; > if (flags & MF_CHECKED) item->fState |= MF_CHECKED; > else item->fState &= ~MF_CHECKED; > return ret; >@@ -3863,14 +3845,6 @@ BOOL WINAPI InsertMenuW( HMENU hMenu, UINT pos, UINT flags, > return FALSE; > } > >- /* Eterbug # 674 */ >- { >- POPUPMENU *menu; >- if ( (menu = MENU_GetMenu(hMenu)) && !item->rect.top && !item->rect.bottom && !item->rect.left && !item->rect.right && (IS_STRING_ITEM(flags) && str) ) >- DefWindowProcW(menu->hWnd, WM_NCPAINT, 0 ,0); >- >- } >- > item->hCheckBit = item->hUnCheckBit = 0; > return TRUE; > } >@@ -3935,7 +3909,6 @@ BOOL WINAPI RemoveMenu( HMENU hMenu, UINT nPos, UINT wFlags ) > /* Remove item */ > > MENU_FreeItemData( item ); >- item->wMagic = 0; > > if (--menu->nItems == 0) > { >@@ -3963,7 +3936,6 @@ BOOL WINAPI RemoveMenu( HMENU hMenu, UINT nPos, UINT wFlags ) > BOOL WINAPI DeleteMenu( HMENU hMenu, UINT nPos, UINT wFlags ) > { > MENUITEM *item = MENU_FindItem( &hMenu, &nPos, wFlags ); >- TRACE("nPos=%d, item=%p\n", nPos, item); > if (!item) return FALSE; > if (item->fType & MF_POPUP) DestroyMenu( item->hSubMenu ); > /* nPos is now the position of the item */ >@@ -4094,15 +4066,14 @@ BOOL WINAPI DestroyMenu( HMENU hMenu ) > { > LPPOPUPMENU lppop; > >+ TRACE("(%p)\n", hMenu); >+ > if (!(lppop = free_user_handle( hMenu, USER_MENU ))) return FALSE; > if (lppop == OBJ_OTHER_PROCESS) return FALSE; > >- TRACE("(%p, %x)\n", hMenu, lppop->wFlags); >- > /* DestroyMenu should not destroy system menu popup owner */ > if ((lppop->wFlags & (MF_POPUP | MF_SYSMENU)) == MF_POPUP && lppop->hWnd) > { >- //SetWindowLongPtrW( lppop->hWnd, GWLP_ID, 0xAAAA ); > DestroyWindow( lppop->hWnd ); > lppop->hWnd = 0; > } >@@ -4115,7 +4086,6 @@ BOOL WINAPI DestroyMenu( HMENU hMenu ) > { > if (item->fType & MF_POPUP) DestroyMenu(item->hSubMenu); > MENU_FreeItemData( item ); >- item->wMagic = 0; > } > HeapFree( GetProcessHeap(), 0, lppop->items ); > } >@@ -4224,7 +4194,7 @@ BOOL MENU_SetMenu( HWND hWnd, HMENU hMenu ) > if (GetCapture() == hWnd) > set_capture_window( 0, GUI_INMENUMODE, NULL ); /* release the capture */ > >- if (hMenu) >+ if (hMenu != 0) > { > LPPOPUPMENU lpmenu; > >diff --git a/dlls/user32/message.c b/dlls/user32/message.c >index d20d20b..b073e1c 100644 >--- a/dlls/user32/message.c >+++ b/dlls/user32/message.c >@@ -45,9 +45,6 @@ > #include "wine/debug.h" > #include "wine/exception.h" > >-#define ETERSOFT_FUNC_TIMER >-#include "wine/etersoft.h" >- > WINE_DEFAULT_DEBUG_CHANNEL(msg); > WINE_DECLARE_DEBUG_CHANNEL(relay); > WINE_DECLARE_DEBUG_CHANNEL(key); >@@ -58,9 +55,6 @@ WINE_DECLARE_DEBUG_CHANNEL(key); > #define MAX_PACK_COUNT 4 > > #define SYS_TIMER_RATE 55 /* min. timer rate in ms (actually 54.925)*/ >-#define MAX_DELAY_SKD 750 >- >-extern CreationTime; > > /* the various structures that can be sent in messages, in platform-independent layout */ > struct packed_CREATESTRUCTW >@@ -427,9 +421,6 @@ static const unsigned int message_unicode_flags[] = > SET(WM_PAINTCLIPBOARD) | SET(WM_SIZECLIPBOARD) | SET(WM_ASKCBFORMATNAME) > }; > >-/* Last message was hardware MOUSEMOVE */ >-int etersoft_mousemove; >- > /* check whether a given message type includes pointers */ > static inline int is_pointer_message( UINT message ) > { >@@ -2376,7 +2367,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H > } > else > { >- msg->hwnd = WINPOS_WindowFromPoint( NULL, msg->pt, &hittest ); >+ msg->hwnd = WINPOS_WindowFromPoint( msg->hwnd, msg->pt, &hittest ); > } > > if (!msg->hwnd || !WIN_IsCurrentThread( msg->hwnd )) >@@ -2654,25 +2645,10 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags > continue; > } > >- /* Eterbug #3768 >- * Drop window on WM_KICKIDLE >- */ >- if (info.msg.message == 0x36a) >- { >- if (info.msg.hwnd != GetActiveWindow()) >- USER_Driver->pDropWindow(info.msg.hwnd); >- } >- >- if ((info.msg.message == WM_SYSKEYDOWN) && !GetFocus()) >- if ((GetTickCount() - CreationTime) < MAX_DELAY_SKD) >- return FALSE; >- > TRACE( "got type %d msg %x (%s) hwnd %p wp %lx lp %lx\n", > info.type, info.msg.message, > (info.type == MSG_WINEVENT) ? "MSG_WINEVENT" : SPY_GetMsgName(info.msg.message, info.msg.hwnd), > info.msg.hwnd, info.msg.wParam, info.msg.lParam ); >- >- etersoft_mousemove = info.msg.message; > > switch(info.type) > { >@@ -4160,20 +4136,8 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc ) > UINT_PTR ret; > WNDPROC winproc = 0; > >- /* Eterbug # 150 */ >- char wclass[80]; >- GetClassNameA(hwnd, wclass,sizeof wclass); >- LOADETER_FUNC(etersoft_1version); >- if ( etersoft_1version && (etersoft_1version() == 8)) >- if ( (id == 2) && (!proc) && !strcmp(wclass, "V8PopupBar") ) >- timeout += 50; >- > if (proc) winproc = WINPROC_AllocProc( (WNDPROC)proc, FALSE ); > >- LOADETER_FUNC(etersoft_fixtimer); >- if (etersoft_fixtimer) >- etersoft_fixtimer(id, &timeout); >- > SERVER_START_REQ( set_win_timer ) > { > req->win = wine_server_user_handle( hwnd ); >@@ -4190,7 +4154,7 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc ) > } > SERVER_END_REQ; > >- TRACE("Added %p %lx %p timeout %d, returning %x\n", hwnd, id, winproc, timeout, ret ); >+ TRACE("Added %p %lx %p timeout %d\n", hwnd, id, winproc, timeout ); > return ret; > } > >diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c >index 7bc2fe9..4b38dd2 100644 >--- a/dlls/user32/misc.c >+++ b/dlls/user32/misc.c >@@ -271,7 +271,7 @@ BOOL WINAPI EnumDisplayDevicesA( LPCSTR lpDevice, DWORD i, LPDISPLAY_DEVICEA lpD > BOOL WINAPI EnumDisplayDevicesW( LPCWSTR lpDevice, DWORD i, LPDISPLAY_DEVICEW lpDisplayDevice, > DWORD dwFlags ) > { >- TRACE("(%s,%d,%p,0x%08x), stub!\n",debugstr_w(lpDevice),i,lpDisplayDevice,dwFlags); >+ FIXME("(%s,%d,%p,0x%08x), stub!\n",debugstr_w(lpDevice),i,lpDisplayDevice,dwFlags); > > if (i) > return FALSE; >diff --git a/dlls/user32/msgbox.c b/dlls/user32/msgbox.c >index 89454c2..effe09b 100644 >--- a/dlls/user32/msgbox.c >+++ b/dlls/user32/msgbox.c >@@ -143,11 +143,9 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb) > DestroyWindow(GetDlgItem(hwnd, IDNO)); > DestroyWindow(GetDlgItem(hwnd, IDCONTINUE)); > DestroyWindow(GetDlgItem(hwnd, IDTRYAGAIN)); >- EnableMenuItem(GetSystemMenu(hwnd,FALSE),SC_CLOSE, MF_DISABLED); > break; > case MB_YESNO: > DestroyWindow(GetDlgItem(hwnd, IDCANCEL)); >- EnableMenuItem(GetSystemMenu(hwnd,FALSE),SC_CLOSE, MF_DISABLED); > /* fall through */ > case MB_YESNOCANCEL: > DestroyWindow(GetDlgItem(hwnd, IDOK)); >@@ -348,7 +346,7 @@ static INT_PTR CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message, > switch (LOWORD(wParam)) > { > case IDOK: >- case IDCANCEL: if(EnableMenuItem(GetSystemMenu(hwnd,FALSE),SC_CLOSE, MF_DISABLED) == MF_DISABLED ) break; >+ case IDCANCEL: > case IDABORT: > case IDRETRY: > case IDIGNORE: >@@ -396,11 +394,6 @@ static INT_PTR CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message, > */ > INT WINAPI MessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type) > { >- if(!strncmp(text,"[ WNetOpenEnum",sizeof(char)*13)) >- { >- TRACE("fixme! %s\n",text); >- return IDOK; >- } > return MessageBoxExA(hWnd, text, title, type, LANG_NEUTRAL); > } > >@@ -514,7 +507,6 @@ INT WINAPI MessageBoxIndirectW( LPMSGBOXPARAMSW msgbox ) > HRSRC hRes; > int ret; > UINT i; >- UINT beepStyle; > struct ThreadWindows threadWindows; > static const WCHAR msg_box_res_nameW[] = { 'M','S','G','B','O','X',0 }; > >@@ -536,11 +528,6 @@ INT WINAPI MessageBoxIndirectW( LPMSGBOXPARAMSW msgbox ) > EnumThreadWindows(GetCurrentThreadId(), MSGBOX_EnumProc, (LPARAM)&threadWindows); > } > >- beepStyle = msgbox->dwStyle & >- (MB_ICONEXCLAMATION|MB_ICONSTOP|MB_ICONERROR|MB_ICONHAND); >- if (beepStyle) >- MessageBeep(beepStyle); >- > ret=DialogBoxIndirectParamW(msgbox->hInstance, tmplate, > msgbox->hwndOwner, MSGBOX_DlgProc, (LPARAM)msgbox); > >diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c >index 1882fd2..64c1186 100644 >--- a/dlls/user32/nonclient.c >+++ b/dlls/user32/nonclient.c >@@ -706,7 +706,7 @@ LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) > * Draws the system icon. > * > *****************************************************************************/ >-BOOL NC_DrawSysButton (HWND hwnd, HDC hdc) >+BOOL NC_DrawSysButton (HWND hwnd, HDC hdc, BOOL down) > { > HICON hIcon = NC_IconForWindow( hwnd ); > >@@ -807,15 +807,13 @@ static void NC_DrawMaxButton(HWND hwnd,HDC hdc,BOOL down, BOOL bGrayed) > static void NC_DrawMinButton(HWND hwnd,HDC hdc,BOOL down, BOOL bGrayed) > { > RECT rect; >- UINT flags; >+ UINT flags = DFCS_CAPTIONMIN; > DWORD style = GetWindowLongW( hwnd, GWL_STYLE ); > DWORD ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE ); > > /* never draw minimize box when window has WS_EX_TOOLWINDOW style */ > if (ex_style & WS_EX_TOOLWINDOW) return; > >- flags = IsIconic(hwnd) ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMIN; >- > NC_GetInsideRect( hwnd, COORDS_WINDOW, &rect, style, ex_style ); > if (style & WS_SYSMENU) > rect.right -= GetSystemMetrics(SM_CXSIZE); >@@ -938,7 +936,7 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd, DWORD style, > NC_DrawCaptionBar (hdc, &r, style, active, gradient); > > if ((style & WS_SYSMENU) && !(exStyle & WS_EX_TOOLWINDOW)) { >- if (NC_DrawSysButton (hwnd, hdc)) >+ if (NC_DrawSysButton (hwnd, hdc, FALSE)) > r.left += GetSystemMetrics(SM_CXSMICON) + 2; > } > >@@ -1012,7 +1010,8 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint ) > flags = wndPtr->flags; > WIN_ReleasePtr( wndPtr ); > >- if (!WIN_IsWindowDrawable( hwnd, 0 )) return; /* Nothing to do */ >+ if ( dwStyle & WS_MINIMIZE || >+ !WIN_IsWindowDrawable( hwnd, 0 )) return; /* Nothing to do */ > > active = flags & WIN_NCACTIVATED; > >@@ -1033,10 +1032,6 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint ) > CombineRgn( hrgn, clip, hrgn, RGN_DIFF ); > hdc = GetDCEx( hwnd, hrgn, DCX_USESTYLE | DCX_WINDOW | DCX_INTERSECTRGN ); > } >- else if (dwStyle & WS_MINIMIZE) >- { >- hdc = GetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ); >- } > else > { > hdc = GetDCEx( hwnd, hrgn, DCX_USESTYLE | DCX_WINDOW | DCX_EXCLUDERGN ); >@@ -1124,6 +1119,9 @@ LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) > > if( dwStyle & WS_VISIBLE ) > { >+ if( dwStyle & WS_MINIMIZE ) >+ WINPOS_RedrawIconTitle( hwnd ); >+ else > NC_DoNCPaint( hwnd, clip, FALSE ); > } > return 0; >@@ -1421,6 +1419,12 @@ LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) > case HTSYSMENU: > if( style & WS_SYSMENU ) > { >+ if( !(style & WS_MINIMIZE) ) >+ { >+ HDC hDC = GetWindowDC(hwnd); >+ NC_DrawSysButton( hwnd, hDC, TRUE ); >+ ReleaseDC( hwnd, hDC ); >+ } > SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lParam ); > } > break; >diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c >index e591f33..e7ce2ec 100644 >--- a/dlls/user32/painting.c >+++ b/dlls/user32/painting.c >@@ -730,7 +730,6 @@ void erase_now( HWND hwnd, UINT rdw_flags ) > { > UINT flags = UPDATE_NONCLIENT | UPDATE_ERASE; > >- if (rdw_flags & RDW_NOFRAME) flags &= ~UPDATE_NONCLIENT; > if (rdw_flags & RDW_NOCHILDREN) flags |= UPDATE_NOCHILDREN; > else if (rdw_flags & RDW_ALLCHILDREN) flags |= UPDATE_ALLCHILDREN; > if (need_erase) flags |= UPDATE_DELAYED_ERASE; >@@ -780,10 +779,7 @@ static void update_now( HWND hwnd, UINT rdw_flags ) > if (!get_update_flags( hwnd, &child, &flags )) break; > if (!flags) break; /* nothing more to do */ > >- if (is_desktop_window(hwnd)) >- PostMessageW( child, WM_PAINT, 0, 0 ); >- else >- SendMessageW( child, WM_PAINT, 0, 0 ); >+ SendMessageW( child, WM_PAINT, 0, 0 ); > if (rdw_flags & RDW_NOCHILDREN) break; > } > } >@@ -1117,17 +1113,7 @@ BOOL WINAPI LockWindowUpdate( HWND hwnd ) > { > static HWND lockedWnd; > >- /* This function is fully implemented by the following patch: >- * >- * http://www.winehq.org/hypermail/wine-patches/2004/01/0142.html >- * >- * but in order to work properly, it needs the ability to invalidate >- * DCEs in other processes when the lock window is changed, which >- * isn't possible yet. >- * -mike >- */ >- >- TRACE("(%p), partial stub!\n",hwnd); >+ FIXME("(%p), partial stub!\n",hwnd); > > USER_Lock(); > if (lockedWnd) >@@ -1187,22 +1173,6 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ) > } > else if (!hrgn) > { >- /* Eterbug #2404 */ >- char class[80]; >- GetClassNameA( hwnd, class, sizeof class ); >- >- if (GetParent(hwnd) && !strcmp( class, "V8Window" ) && !WIN_ListChildren(hwnd)) >- { >- int i; >- HWND *childs = WIN_ListChildren(GetParent(hwnd)); >- redraw_window_rects( GetParent(hwnd), flags, NULL, 0 ); >- for( i = 0; childs[i]; i++ ) >- { >- if (childs[i] != hwnd) >- redraw_window_rects( childs[i], flags, NULL, 0 ); >- } >- } >- > ret = redraw_window_rects( hwnd, flags, NULL, 0 ); > } > else /* need to build a list of the region rectangles */ >diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c >index 8ae564d..7e02a42 100644 >--- a/dlls/user32/scroll.c >+++ b/dlls/user32/scroll.c >@@ -1719,7 +1719,6 @@ static INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar, LPCSCROLLINFO info, BOOL b > if (info->fMask != SIF_PAGE) > { > new_flags = ESB_ENABLE_BOTH; >- EnableWindow( hwnd, TRUE ); > if ((nBar != SB_CTL) && ( (action & SA_SSI_REFRESH) )) > action |= SA_SSI_SHOW; > } >diff --git a/dlls/user32/static.c b/dlls/user32/static.c >index ce2de7d..99ce319 100644 >--- a/dlls/user32/static.c >+++ b/dlls/user32/static.c >@@ -118,7 +118,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style ) > HICON prevIcon; > SIZE size; > >- if ((style & SS_TYPEMASK) != SS_ICON) return (HICON)-1; >+ if ((style & SS_TYPEMASK) != SS_ICON) return 0; > if (hicon && !get_icon_size( hicon, &size )) > { > WARN("hicon != 0, but invalid\n"); >@@ -153,7 +153,7 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style ) > { > HBITMAP hOldBitmap; > >- if ((style & SS_TYPEMASK) != SS_BITMAP) return (HBITMAP)-1; >+ if ((style & SS_TYPEMASK) != SS_BITMAP) return 0; > if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP) { > WARN("hBitmap != 0, but it's not a bitmap\n"); > return 0; >@@ -189,7 +189,7 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style ) > */ > static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style ) > { >- if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return (HENHMETAFILE)-1; >+ if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return 0; > if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE) { > WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n"); > return 0; >@@ -532,18 +532,12 @@ LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam > FIXME("STM_SETIMAGE: Unhandled type %lx\n", wParam); > break; > } >- if (lResult != -1) >- STATIC_TryPaintFcn( hwnd, full_style ); >- else >- lResult = 0; >+ STATIC_TryPaintFcn( hwnd, full_style ); > break; > > case STM_SETICON: > lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)wParam, full_style ); >- if (lResult != -1) >- STATIC_TryPaintFcn( hwnd, full_style ); >- else >- lResult = 0; >+ STATIC_TryPaintFcn( hwnd, full_style ); > break; > > default: >diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c >index e23f50f..dcf11ef 100644 >--- a/dlls/user32/sysparams.c >+++ b/dlls/user32/sysparams.c >@@ -85,7 +85,6 @@ enum spi_index > SPI_MINIMIZEDMETRICS_IDX, > SPI_SETFOREGROUNDLOCKTIMEOUT_IDX, > SPI_CARETWIDTH_IDX, >- SPI_SETDROPSHADOW_IDX, > SPI_SETMOUSESPEED_IDX, > SPI_SETFONTSMOOTHINGTYPE_IDX, > SPI_SETFONTSMOOTHINGCONTRAST_IDX, >@@ -239,9 +238,6 @@ static const WCHAR SPI_SETFONTSMOOTHINGCONTRAST_VALNAME[]= {'F','o','n','t',' > static const WCHAR SPI_SETFONTSMOOTHINGORIENTATION_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; > static const WCHAR SPI_SETFONTSMOOTHINGORIENTATION_VALNAME[]= {'F','o','n','t','S','m','o','o','t','h','i','n','g','O','r','i','e','n','t','a','t','i','o','n',0}; > >-static const WCHAR SPI_SETDROPSHADOW_REGKEY[]= {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', 'E','x','p','l','o','r','e','r','\\','V','i','s','u','a','l','E','f','f','e','c','t','s','\\', 'D','r','o','p','S','h','a','d','o','w',0}; >-static const WCHAR DEFAULTAPPLIED[]={'D','e','f','a','u','l','t','A','p','p','l','i','e','d',0}; >- > /* FIXME - real values */ > static const WCHAR SPI_SETSCREENSAVERRUNNING_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; > static const WCHAR SPI_SETSCREENSAVERRUNNING_VALNAME[]= {'W','I','N','E','_','S','c','r','e','e','n','S','a','v','e','r','R','u','n','n','i','n','g',0}; >@@ -293,8 +289,6 @@ static const WCHAR IconTitleFaceName[]= {'I','c','o','n','T > static const WCHAR defPattern[]= {'0',' ','0',' ','0',' ','0',' ','0',' ','0',' ','0',' ','0',0}; > static const WCHAR CSu[]= {'%','u',0}; > static const WCHAR CSd[]= {'%','d',0}; >-static const WCHAR registry_key[] = {'S','y','s','t','e','m','\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\','H','a','r','d','w','a','r','e',' ','P','r','o','f','i','l','e','s','\\','C','u','r','r','e','n','t','\\','S','o','f','t','w','a','r','e','\\','F','o','n','t','s','\0'}; >-static const WCHAR log_pixels[] = { 'L','o','g','P','i','x','e','l','s','\0'}; > > /* Indicators whether system parameter value is loaded */ > static char spi_loaded[SPI_INDEX_COUNT]; >@@ -334,7 +328,6 @@ static BOOL snap_to_default_button = FALSE; > static BOOL swap_buttons = FALSE; > static UINT foreground_lock_timeout = 0; > static UINT caret_width = 1; >-static BOOL drop_shadow = 0; > static UINT mouse_sensitivity = 10; > static UINT font_smoothing_type = 0; > static UINT font_smoothing_contrast = 0; >@@ -1062,10 +1055,6 @@ static void load_nonclient_metrics(void) > HKEY hkey; > NONCLIENTMETRICSW ncm; > INT r; >- DWORD size; >- DWORD type; >- HKEY menuhKey; >- DWORD logpixels; > > ncm.cbSize = sizeof (ncm); > if (RegOpenKeyExW (HKEY_CURRENT_USER, METRICS_REGKEY, >@@ -1101,13 +1090,6 @@ static void load_nonclient_metrics(void) > ncm.iMenuHeight = get_reg_metric(hkey, METRICS_MENUHEIGHT_VALNAME, 18); > ncm.iMenuWidth = get_reg_metric(hkey, METRICS_MENUWIDTH_VALNAME, ncm.iMenuHeight); > >- size = sizeof (DWORD); >- RegOpenKeyExW (HKEY_LOCAL_MACHINE, registry_key, >- 0, KEY_QUERY_VALUE, &menuhKey); >- if (!RegQueryValueExW (menuhKey, log_pixels, NULL, &type, >- (LPBYTE) &logpixels, &size) == ERROR_SUCCESS) >- logpixels = 96; >- RegCloseKey( menuhKey ); > /* menu font metrics */ > if (!reg_get_logfont(METRICS_REGKEY, METRICS_MENULOGFONT_VALNAME, &ncm.lfMenuFont)) > { >@@ -1118,7 +1100,6 @@ static void load_nonclient_metrics(void) > if (r) > ncm.lfMenuFont.lfHeight = -r; > ncm.lfMenuFont.lfWeight = FW_NORMAL; >- ncm.lfMenuFont.lfHeight = MulDiv(ncm.lfMenuFont.lfHeight, logpixels, 96); > } > > /* status bar font metrics */ >@@ -1131,7 +1112,6 @@ static void load_nonclient_metrics(void) > if (r) > ncm.lfStatusFont.lfHeight = -r; > ncm.lfStatusFont.lfWeight = FW_NORMAL; >- ncm.lfStatusFont.lfHeight = MulDiv(ncm.lfStatusFont.lfHeight, logpixels, 96); > } > > /* message font metrics */ >@@ -1144,7 +1124,6 @@ static void load_nonclient_metrics(void) > if (r) > ncm.lfMessageFont.lfHeight = -r; > ncm.lfMessageFont.lfWeight = FW_NORMAL; >- ncm.lfMessageFont.lfHeight = MulDiv(ncm.lfMessageFont.lfHeight, logpixels, 96); > } > > /* some extra fields not in the nonclient structure */ >@@ -2327,22 +2306,6 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, > ret = set_user_pref_param( 2, 0x02, PtrToUlong(pvParam), fWinIni ); > break; > >-# if 0 /* Old Etersoft implementation */ >- /* TODO: Windows does more real operations here */ >- case SPI_GETDROPSHADOW: /* 0x1024 _WIN32_WINNT >= 0x510 */ >- ret = get_bool_param( SPI_SETDROPSHADOW_IDX, >- SPI_SETDROPSHADOW_REGKEY, >- DEFAULTAPPLIED, >- &drop_shadow, pvParam ); >- break; >- >- case SPI_SETDROPSHADOW: /* 0x1025 _WIN32_WINNT >= 0x510 */ >- ret = set_bool_param( SPI_SETDROPSHADOW_IDX, >- SPI_SETDROPSHADOW_REGKEY, >- DEFAULTAPPLIED, >- &drop_shadow, uiParam, 0 ); >- break; >-#endif > case SPI_GETDROPSHADOW: > ret = get_user_pref_param( 2, 0x04, pvParam ); > break; >@@ -3227,7 +3190,7 @@ BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum, > */ > BOOL WINAPI SetProcessDPIAware( VOID ) > { >- TRACE( "stub!\n"); >+ FIXME( "stub!\n"); > > return TRUE; > } >diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c >index ef3b20b..fb74143 100644 >--- a/dlls/user32/tests/edit.c >+++ b/dlls/user32/tests/edit.c >@@ -548,8 +548,6 @@ static const char szEditTest2Class[] = "EditTest2Class"; > static const char szEditTest3Class[] = "EditTest3Class"; > static const char szEditTest4Class[] = "EditTest4Class"; > static const char szEditTextPositionClass[] = "EditTextPositionWindowClass"; >-static const char szEditNotyfyClass1[] = "EditNotyfyClass1"; >-static const char szEditNotyfyClass2[] = "EditNotyfyClass2"; > > static HWND create_editcontrol (DWORD style, DWORD exstyle) > { >@@ -663,202 +661,6 @@ static void set_client_height(HWND Wnd, unsigned Height) > Height, ClientRect.bottom - ClientRect.top); > } > >-#define PIXEL_X 2 >-#define PIXEL_Y 2 >- >-static void test_edit_parent_desktop_1(void) >-{ >- HWND hwEdit, hwEditDef, hwDefault; >- DWORD editcolor, syscolor; >- >- hwDefault = CreateWindowEx( 0, szEditTest2Class, NULL, >- WS_OVERLAPPEDWINDOW | WS_VISIBLE, >- 10, 10, 300, 300, NULL, NULL, hinst, NULL); >- >- hwEditDef = CreateWindowEx( 0, "EDIT", NULL, WS_CHILD | WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 10, 10, 50, 50, >- hwDefault, NULL, hinst, NULL); >- >- hwEdit = CreateWindowEx( 0, "EDIT", NULL, WS_CHILD | WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 100, 100, 200, 200, >- GetDesktopWindow(), NULL, hinst, NULL); >- >- SendMessage( hwEditDef, WM_PAINT, (WPARAM)GetDC( hwEditDef ), 0 ); >- SendMessage( hwEdit, WM_PAINT, (WPARAM)GetDC( hwEdit ), 0 ); >- >- editcolor = GetPixel( GetDC( hwEdit ), PIXEL_X, PIXEL_Y ); >- syscolor = GetPixel( GetDC( hwEditDef ), PIXEL_X, PIXEL_Y ); >- >- ok( editcolor == syscolor, "Get incorrect parent device context handle: brush color = %04x\n", editcolor ); >- >- EnableWindow( hwEdit, FALSE ); >- SendMessage( hwEdit, WM_PAINT, (WPARAM)GetDC( hwEdit ), 0 ); >- editcolor = GetPixel( GetDC( hwEdit ), PIXEL_X, PIXEL_Y ); >- >- ok( editcolor == syscolor, "Get incorrect parent device context handle: brush color = %04x\n", editcolor ); >- >- DestroyWindow( hwEdit ); >- DestroyWindow( hwEditDef ); >- DestroyWindow( hwDefault ); >-} >- >-static void test_edit_parent_desktop_2(void) >-{ >- HWND hwEdit, hwParent1, hwParent2; >- DWORD editcolor, syscolor; >- >- hwParent1 = CreateWindowEx( 0, szEditTextPositionClass, NULL, WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 10, 10, 150, 150, >- NULL, NULL, hinst, NULL); >- >- >- hwParent2 = CreateWindowEx( 0, szEditTextPositionClass, NULL, WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 150, 150, 250, 250, >- NULL, NULL, hinst, NULL); >- >- >- hwEdit = CreateWindowEx( 0, "EDIT", NULL, WS_CHILD | WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 60, 60, 100, 100, >- hwParent1, NULL, hinst, NULL); >- >- SendMessage( hwEdit, WM_PAINT, (WPARAM)GetDC( hwEdit ), 0 ); >- syscolor = GetPixel( GetDC( hwEdit ), PIXEL_X, PIXEL_Y ); >- >- SetParent( hwEdit, hwParent2 ); >- DestroyWindow( hwParent1 ); >- >- SendMessage( hwEdit, WM_PAINT, (WPARAM)GetDC( hwEdit ), 0 ); >- editcolor = GetPixel( GetDC( hwEdit ), PIXEL_X, PIXEL_Y ); >- >- ok( editcolor == syscolor, "Child color is wrong, child = %04x\n", editcolor ); >- >- DestroyWindow( hwEdit ); >- DestroyWindow( hwParent2 ); >-} >- >-LRESULT CALLBACK wpParent1(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) >-{ >- static int idx = 0; >- int sequence[] = {EN_SETFOCUS, EN_KILLFOCUS, EN_MAXTEXT, EN_UPDATE, EN_CHANGE}; >- >- switch ( message ) >- { >- case WM_COMMAND: >- switch(HIWORD( wParam )) >- { >- case EN_SETFOCUS: >- case EN_KILLFOCUS: >- case EN_CHANGE: >- case EN_UPDATE: >- case EN_ERRSPACE: >- case EN_MAXTEXT: >- case EN_HSCROLL: >- case EN_VSCROLL: >- if(idx < (sizeof( sequence ) / sizeof( int ))) >- ok( HIWORD( wParam ) == sequence[idx], "expected %04x - actual %04x\n", >- sequence[idx], HIWORD( wParam ) ); >- else >- todo_wine >- { >- ok( 0, "expected 0000 - actual %04x\n", HIWORD( wParam )); >- } >- idx++; >- break; >- } >- break; >- case WM_DESTROY: >- PostQuitMessage( 0 ); >- break; >- >- default: >- return DefWindowProc( hWnd, message, wParam, lParam ); >- break; >- } >- return 0; >-} >- >-LRESULT CALLBACK wpParent2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) >-{ >- switch ( message ) >- { >- case WM_COMMAND: >- switch(HIWORD( wParam )) >- { >- case EN_SETFOCUS: >- case EN_KILLFOCUS: >- case EN_CHANGE: >- case EN_UPDATE: >- case EN_ERRSPACE: >- case EN_MAXTEXT: >- case EN_HSCROLL: >- case EN_VSCROLL: >- ok( 0, "notification %04x sent to hwnd=0x%04x\n", (int)HIWORD( wParam ), hWnd ); >- break; >- } >- break; >- case WM_DESTROY: >- PostQuitMessage( 0 ); >- break; >- >- default: >- return DefWindowProc( hWnd, message, wParam, lParam ); >- break; >- } >- return 0; >-} >- >-static void test_edit_parent_desktop_3(void) >-{ >- HWND hwEdit, hwEditMult, hwParent1, hwParent2; >- MSG msg; >- char text[] = "11111111111111111"; >- >- hwParent1 = CreateWindowEx( 0, szEditNotyfyClass1, NULL, WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 10, 10, 150, 150, >- NULL, NULL, hinst, NULL ); >- >- >- hwParent2 = CreateWindowEx( 0, szEditNotyfyClass2, NULL, WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 150, 150, 250, 250, >- NULL, NULL, hinst, NULL ); >- >- >- hwEdit = CreateWindowEx( 0, "EDIT", NULL, WS_CHILD | WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 60, 60, 100, 100, >- hwParent1, NULL, hinst, NULL ); >- >- hwEditMult = CreateWindowEx( 0, "EDIT", NULL, ES_MULTILINE | ES_AUTOHSCROLL | >- ES_AUTOVSCROLL | WS_CHILD | WS_OVERLAPPEDWINDOW | >- WS_VISIBLE, 60, 60, 100, 100, >- hwParent1, NULL, hinst, NULL ); >- >- >- SetParent( hwEdit, hwParent2 ); >- SetParent( hwEditMult, hwParent2 ); >- >- /* EN_SETFOCUS */ >- SendMessage( hwEdit, WM_SETFOCUS, NULL, NULL ); >- >- /* EN_KILLFOCUS */ >- SendMessage( hwEdit, WM_KILLFOCUS, NULL, NULL ); >- >- /* FIXME: add EN_ERRSPACE */ >- >- /* EN_MAXTEXT, EN_UPDATE, EN_CHANGE */ >- SendMessage( hwEdit, EM_REPLACESEL, TRUE, (LPARAM)text ); >- >- /* EN_HSCROLL */ >- SendMessage( hwEditMult, WM_HSCROLL, MAKEWPARAM( SB_THUMBPOSITION, NULL ), NULL ); >- >- /* EN_VSCROLL */ >- SendMessage( hwEditMult, WM_VSCROLL, MAKEWPARAM( SB_THUMBPOSITION, NULL ), NULL ); >- >- DestroyWindow( hwParent1 ); >- DestroyWindow( hwEditMult ); >- DestroyWindow( hwEdit ); >- DestroyWindow( hwParent2 ); >-} >- > static void test_edit_control_1(void) > { > HWND hwEdit; >@@ -2346,8 +2148,6 @@ static BOOL RegisterWindowClasses (void) > WNDCLASSA test3; > WNDCLASSA test4; > WNDCLASSA text_position; >- WNDCLASSA test_notify1; >- WNDCLASSA test_notify2; > > test2.style = 0; > test2.lpfnWndProc = ET2_WndProc; >@@ -2397,31 +2197,6 @@ static BOOL RegisterWindowClasses (void) > text_position.lpfnWndProc = DefWindowProc; > if (!RegisterClassA(&text_position)) return FALSE; > >- test_notify1.style = CS_HREDRAW | CS_VREDRAW; >- test_notify1.cbClsExtra = 0; >- test_notify1.cbWndExtra = 0; >- test_notify1.hInstance = hinst; >- test_notify1.hIcon = NULL; >- test_notify1.hCursor = LoadCursor( NULL, IDC_ARROW ); >- test_notify1.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); >- test_notify1.lpszMenuName = NULL; >- test_notify1.lpszClassName = szEditNotyfyClass1; >- test_notify1.lpfnWndProc = wpParent1; >- if (!RegisterClassA(&test_notify1)) return FALSE; >- >- test_notify2.style = CS_HREDRAW | CS_VREDRAW; >- test_notify2.cbClsExtra = 0; >- test_notify2.cbWndExtra = 0; >- test_notify2.hInstance = hinst; >- test_notify2.hIcon = NULL; >- test_notify2.hCursor = LoadCursor( NULL, IDC_ARROW ); >- test_notify2.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); >- test_notify2.lpszMenuName = NULL; >- test_notify2.lpszClassName = szEditNotyfyClass2; >- test_notify2.lpfnWndProc = wpParent2; >- if (!RegisterClassA(&test_notify2)) return FALSE; >- >- > return TRUE; > } > >@@ -2431,8 +2206,6 @@ static void UnregisterWindowClasses (void) > UnregisterClassA(szEditTest3Class, hinst); > UnregisterClassA(szEditTest4Class, hinst); > UnregisterClassA(szEditTextPositionClass, hinst); >- UnregisterClassA(szEditNotyfyClass1, hinst); >- UnregisterClassA(szEditNotyfyClass2, hinst); > } > > static void test_fontsize(void) >@@ -2688,9 +2461,6 @@ START_TEST(edit) > test_singleline_wantreturn_edit_dialog(); > test_child_edit_wmkeydown(); > test_fontsize(); >- test_edit_parent_desktop_2(); >- test_edit_parent_desktop_3(); >- test_edit_parent_desktop_1(); > test_dialogmode(); > if (pEndMenu) > test_contextmenu_focus(); >diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c >index d3a73c4..ba1c802 100644 >--- a/dlls/user32/tests/sysparams.c >+++ b/dlls/user32/tests/sysparams.c >@@ -147,10 +147,6 @@ static HDC hdc; > #define SPI_SETDESKWALLPAPER_REGKEY "Control Panel\\Desktop" > #define SPI_SETDESKWALLPAPER_VALNAME "Wallpaper" > >-#define SPI_SETDROPSHADOW_REGKEY "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\VisualEffects\\DropShadow" >-#define DEFAULTVALUE "DefaultValue" >-#define DEFAULTAPPLIED "DefaultApplied" >- > /* volatile registry branch under CURRENT_USER_REGKEY for temporary values storage */ > #define WINE_CURRENT_USER_REGKEY "Wine" > >@@ -380,47 +376,6 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS > #define test_reg_key_ex2_optional( subKey1, subKey2, valName1, valName2, testValue ) \ > _test_reg_key( subKey1, subKey2, valName1, valName2, testValue, TRUE ) > >-/* >- * Tests the HKEY_CURRENT_USER subkey value. >- * The value should contain DWORD value. >- * >- * Params: >- * lpsSubKey - subkey name >- * lpsRegName - registry entry name >- * lpsTestValue - value to test >- */ >-static void test_reg_key_dword( LPCSTR subKey, LPCSTR valName, DWORD testValue ) >-{ >- DWORD value; >- DWORD valueLen; >- DWORD type; >- HKEY hKey; >- LONG rc; >- int found=0; >- >- value=0; >- valueLen=sizeof(value); >- RegOpenKeyA( HKEY_CURRENT_USER, subKey, &hKey ); >- rc=RegQueryValueExA( hKey, valName, NULL, &type, (LPBYTE)&value, &valueLen ); >- RegCloseKey( hKey ); >- if (rc==ERROR_SUCCESS) >- { >- ok(type == REG_DWORD, "Wrong type of the value %s%s in registry: %d\n", subKey, valName, type); >- ok(testValue == value, >- "Wrong value in registry: subKey=%s, valName=%s, testValue=0x%0x, value=0x%0x\n", >- subKey, valName, testValue, value ); >- found++; >- } >- else if (strict) >- { >- ok(0, "Missing registry entry: subKey=%s, valName=%s\n", >- subKey, valName); >- } >- ok(found, "Missing registry value: %s in key: %s \n", >- valName, subKey ); >-} >- >- > /* get a metric from the registry. If the value is negative > * it is assumed to be in twips and converted to pixels */ > static UINT metricfromreg( const char *keyname, const char *valname, int dpi) >@@ -2399,44 +2354,6 @@ static void test_SPI_SETWALLPAPER( void ) /* 115 */ > test_reg_key(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, oldval); > } > >-static void test_SPI_SETDROPSHADOW( void ) /* 0x1025 */ >-{ >- BOOL rc; >- BOOL old_b; >- const UINT vals[]={0,1}; >- unsigned int i; >- >- trace("testing SPI_{GET,SET}DROPSHADOW\n"); >- if( iswin9x ) return; /* 95/98/ME don't implement this */ >- SetLastError(0xdeadbeef); >- rc=SystemParametersInfoA( SPI_GETDROPSHADOW, 0, &old_b, 0 ); >- if (!test_error_msg(rc,"SPI_{GET,SET}DROPSHADOW")) >- return; >- >- for (i=0;i<sizeof(vals)/sizeof(*vals);i++) >- { >- BOOL v; >- rc=SystemParametersInfoA( SPI_SETDROPSHADOW, vals[i], 0, >- SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); >- ok(rc!=0,"set %d: rc=%d err=%d\n",i,rc,GetLastError()); >- /* On WinXP set the WParam to 0 when it broadcasts WM_SETTINGCHANGE for SPI_SETDROPSHADOW and other Visial Effects. On Vista it does set the WParam at all >- test_change_message( SPI_SETDROPSHADOW, 0 ); >- */ >- test_reg_key_dword( SPI_SETDROPSHADOW_REGKEY, >- DEFAULTVALUE, vals[i] ); >- test_reg_key_dword( SPI_SETDROPSHADOW_REGKEY, >- DEFAULTAPPLIED, vals[i] ); >- >- rc=SystemParametersInfoA( SPI_GETDROPSHADOW, 0, &v, 0 ); >- ok(rc!=0,"get %d: rc=%d err=%d\n",i,rc,GetLastError()); >- eq( v, vals[i], "SPI_GETDROPSHADOW", "%d" ); >- } >- >- rc=SystemParametersInfoA( SPI_SETDROPSHADOW, old_b, 0, 0 ); >- ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError()); >-} >- >- > static void test_WM_DISPLAYCHANGE(void) > { > DEVMODE mode, startmode; >@@ -2568,7 +2485,6 @@ static DWORD WINAPI SysParamsThreadFunc( LPVOID lpParam ) > test_SPI_SETWHEELSCROLLCHARS(); /* 108 */ > test_SPI_SETWALLPAPER(); /* 115 */ > >- test_SPI_SETDROPSHADOW(); /* 0x1024 */ > > SendMessageA( ghTestWnd, WM_DESTROY, 0, 0 ); > return 0; >diff --git a/dlls/user32/text.c b/dlls/user32/text.c >index 8ef136b..e34877f 100644 >--- a/dlls/user32/text.c >+++ b/dlls/user32/text.c >@@ -91,9 +91,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(text); > #define FORWARD_SLASH '/' > #define BACK_SLASH '\\' > >-/* Global handle for eterbug 1981 */ >-HANDLE eterbug1981 = NULL; >- > static const WCHAR ELLIPSISW[] = {'.','.','.', 0}; > > typedef struct tag_ellipsis_data >@@ -374,16 +371,14 @@ static void TEXT_WordBreak (HDC hdc, WCHAR *str, unsigned int max_str, > { > while (p > str && *(--p) != SPACE) > ; >- word_fits = (p != str || *p == SPACE || *p == TAB); >+ word_fits = (p != str || *p == SPACE); > } > /* If there was one or the first character didn't fit then */ > if (word_fits) > { > int next_is_space; > /* break the line before/after that character */ >- if (*p == TAB) >- ; >- else if ((!(format & (DT_RIGHT | DT_CENTER)) || *p != SPACE)) >+ if (!(format & (DT_RIGHT | DT_CENTER)) || *p != SPACE) > p++; > next_is_space = (p - str) < *len_str && *p == SPACE; > *len_str = p - str; >@@ -664,8 +659,6 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, > * ellipsify it > */ > >- if ((seg_j > 0) && *(dest + seg_j - 1) == TAB) >- seg_j--; > j_in_seg = j - seg_j; > max_seg_width = width - plen; > GetTextExtentExPointW (hdc, dest + seg_j, j_in_seg, max_seg_width, &num_fit, NULL, &size); >@@ -681,9 +674,6 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, > { > const WCHAR *s; > unsigned int chars_used; >- >- if (!num_fit && (j_in_seg>1) && (format & DT_CALCRECT)) >- num_fit = 1; > TEXT_WordBreak (hdc, dest+seg_j, maxl-seg_j, &j_in_seg, > max_seg_width, format, num_fit, &chars_used, &size); > line_fits = (size.cx <= max_seg_width); >@@ -726,8 +716,7 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, > /* If we are here after a path ellipsification it must be > * because even the ellipsis itself didn't fit. > */ >- if (pellip->under || pellip->after) >- FIXME("pellip: the condition is not executed\n"); >+ assert (pellip->under == 0 && pellip->after == 0); > pellip->before = before; > pellip->len = len_ellipsis; > /* pellip->after remains as zero as does >@@ -860,7 +849,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count, > TEXTMETRICW tm; > int lmargin = 0, rmargin = 0; > int x = rect->left, y = rect->top; >- int width = rect->right - rect->left + 1; >+ int width = rect->right - rect->left; > int max_width = 0; > int last_line; > int tabwidth /* to keep gcc happy */ = 0; >@@ -1151,15 +1140,6 @@ INT WINAPI DrawTextA( HDC hdc, LPCSTR str, INT count, LPRECT rect, UINT flags ) > { > DRAWTEXTPARAMS dtp; > >- /* Fix eterbug 1981 */ >- if((!lstrcmpA(str, "\xce\xf8\xe8\xe1\xea\xe0 \xe2\xfb\xf5\xee\xe4\xe0 \xe7\xe0 \xe3\xf0\xe0\xed\xe8\xf6\xfb (Range check)\r\n \r\n\xc7\xe0\xe2\xe5\xf0\xf8\xe8\xf2\xfc \xef\xf0\xe8\xeb\xee\xe6\xe5\xed\xe8\xe5?")) && (eterbug1981)) >- { >- WARN("Killing error message window\n"); >- SendMessageA(eterbug1981, WM_CLOSE, 0, 0); >- eterbug1981 = NULL; >- } >- /* End of fix eterbug 1981 */ >- > memset (&dtp, 0, sizeof(dtp)); > dtp.cbSize = sizeof(dtp); > if (flags & DT_TABSTOP) >diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h >index 91fad66..23b4269 100644 >--- a/dlls/user32/user_private.h >+++ b/dlls/user32/user_private.h >@@ -101,7 +101,6 @@ typedef struct tagUSER_DRIVER { > BOOL (CDECL *pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT); > void (CDECL *pSetCapture)(HWND,UINT); > void (CDECL *pSetFocus)(HWND); >- void (CDECL *pDropWindow)(HWND); > void (CDECL *pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD); > void (CDECL *pSetParent)(HWND,HWND,HWND); > int (CDECL *pSetWindowRgn)(HWND,HRGN,BOOL); >diff --git a/dlls/user32/win.c b/dlls/user32/win.c >index 10914f1..1b67329 100644 >--- a/dlls/user32/win.c >+++ b/dlls/user32/win.c >@@ -41,10 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(win); > #define NB_USER_HANDLES ((LAST_USER_HANDLE - FIRST_USER_HANDLE + 1) >> 1) > #define USER_HANDLE_TO_INDEX(hwnd) ((LOWORD(hwnd) - FIRST_USER_HANDLE) >> 1) > >-/* Global handle for eterbug 1981 */ >-extern HANDLE eterbug1981; >-DWORD CreationTime; >- > static DWORD process_layout = ~0u; > > /**********************************************************************/ >@@ -834,6 +830,10 @@ LRESULT WIN_DestroyWindow( HWND hwnd ) > free_dce( wndPtr->dce, hwnd ); > wndPtr->dce = NULL; > icon_title = wndPtr->icon_title; >+ HeapFree( GetProcessHeap(), 0, wndPtr->text ); >+ wndPtr->text = NULL; >+ HeapFree( GetProcessHeap(), 0, wndPtr->pScroll ); >+ wndPtr->pScroll = NULL; > WIN_ReleasePtr( wndPtr ); > > if (icon_title) DestroyWindow( icon_title ); >@@ -1507,14 +1507,6 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, > HOOK_CallHooks( WH_SHELL, HSHELL_WINDOWCREATED, (WPARAM)hwnd, 0, TRUE ); > > TRACE("created window %p\n", hwnd); >- >- /* Fix eterbug 1981 */ >- if(HIWORD(cs->lpszName) && !lstrcmpA(cs->lpszName, "\xce\xf8\xe8\xe1\xea\xe0")) >- eterbug1981 = hwnd; >- >- if (!(cs->style & WS_POPUP)) >- CreationTime = GetTickCount(); >- > return hwnd; > > failed: >@@ -2202,36 +2194,12 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B > case GWLP_WNDPROC: > { > WNDPROC proc; >- char classname[80]; > UINT old_flags = wndPtr->flags; >- >- if(GetVersion() & 0x80000000) >- { >- retval = WIN_GetWindowLong( hwnd, offset, size, unicode ); >- GetClassNameA(hwnd,classname,sizeof classname); >- TRACE("classname = %s\n",classname); >- if ( unicode && strcmp(classname,"V8Window") ) >- proc = WINPROC_AllocProc( NULL, (WNDPROC)newval ); >- else >- proc = WINPROC_AllocProc( (WNDPROC)newval, NULL ); >- if (proc) >- wndPtr->winproc = proc; >- if (WINPROC_IsUnicode( proc, unicode )) >- wndPtr->flags |= WIN_ISUNICODE; >- else >- wndPtr->flags &= ~WIN_ISUNICODE; >- } >- else >- { >- retval = (ULONG_PTR)WINPROC_GetProc( wndPtr->winproc, unicode ); >- >- if (unicode) proc = WINPROC_AllocProc( NULL, (WNDPROC)newval ); >- else proc = WINPROC_AllocProc( (WNDPROC)newval, NULL ); >- if (proc) wndPtr->winproc = proc; >- if (WINPROC_IsUnicode( proc, unicode )) wndPtr->flags |= WIN_ISUNICODE; >- else wndPtr->flags &= ~WIN_ISUNICODE; >- } >- >+ retval = WIN_GetWindowLong( hwnd, offset, size, unicode ); >+ proc = WINPROC_AllocProc( (WNDPROC)newval, unicode ); >+ if (proc) wndPtr->winproc = proc; >+ if (WINPROC_IsUnicode( proc, unicode )) wndPtr->flags |= WIN_ISUNICODE; >+ else wndPtr->flags &= ~WIN_ISUNICODE; > if (!((old_flags ^ wndPtr->flags) & WIN_ISUNICODE)) > { > WIN_ReleasePtr( wndPtr ); >@@ -2284,13 +2252,6 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B > break; > case GWL_EXSTYLE: > req->flags = SET_WIN_EXSTYLE; >- /* WS_EX_TOPMOST can only be changed through SetWindowPos */ >- >- /* Eterbug #3768, #3024 >- * We need able to set WS_EX_TOPMOST style without >- * SetWindowPos calling for Drop/Raise windows >- */ >- if (0) > req->ex_style = newval; > break; > case GWLP_ID: >@@ -2513,33 +2474,6 @@ LONG WINAPI SetWindowLongW( > INT offset, /* [in] offset, in bytes, of location to alter */ > LONG newval /* [in] new value of location */ > ) { >- if (GetVersion()&0x80000000 && offset == GWLP_WNDPROC) >- { >- /* CodeWeavers Only Hack... Needed for the Delegates tab >- * in Outlook XP running in win98 mode >- */ >- char class[80]; >- GetClassNameA(hwnd, class, sizeof(class)); >- if (strcmp(class,"REListBox20W")==0) >- { >- char name[MAX_PATH], *p; >- >- GetModuleFileNameA(GetModuleHandleA(NULL),name,MAX_PATH); >- p = strrchr(name, '\\'); >- >- if (p) >- p++; >- else >- p = name; >- >- if (!strcasecmp(p,"OUTLOOK.EXE")) >- { >- ERR("Outlook in WIN98 calling supposedly unimplemented function, triggering bandaid for class %s\n",debugstr_a(class)); >- SetLastError(ERROR_CALL_NOT_IMPLEMENTED); >- return 0; >- } >- } >- } > return WIN_SetWindowLong( hwnd, offset, sizeof(LONG), newval, TRUE ); > } > >diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c >index 652abed..716616f 100644 >--- a/dlls/user32/winpos.c >+++ b/dlls/user32/winpos.c >@@ -80,11 +80,6 @@ typedef struct > > /*********************************************************************** > * SwitchToThisWindow (USER32.@) >- * Restore minimized window (undocumented). See SetForegroundWindow also. >- * >- * PARAMS >- * hwnd [ I] handle of the window >- * restore [ I] TRUE for restore, FALSE for minimize window > */ > void WINAPI SwitchToThisWindow( HWND hwnd, BOOL alt_tab ) > { >@@ -837,7 +832,7 @@ static POINT WINPOS_FindIconPos( HWND hwnd, POINT pt ) > > hrgn = CreateRectRgn( 0, 0, 0, 0 ); > tmp = CreateRectRgn( 0, 0, 0, 0 ); >- for (child = GetWindow( parent, GW_CHILD ); child; child = GetWindow( child, GW_HWNDNEXT )) >+ for (child = GetWindow( parent, GW_HWNDFIRST ); child; child = GetWindow( child, GW_HWNDNEXT )) > { > if (child == hwnd) continue; > if ((GetWindowLongW( child, GWL_STYLE ) & (WS_VISIBLE|WS_MINIMIZE)) != (WS_VISIBLE|WS_MINIMIZE)) >@@ -898,10 +893,8 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect ) > case SW_SHOWMINNOACTIVE: > case SW_SHOWMINIMIZED: > case SW_FORCEMINIMIZE: >- return SWP_NOSIZE | SWP_NOMOVE; > case SW_MINIMIZE: >- ShowWindow(hwnd, SW_RESTORE); >- return SWP_STATECHANGED; >+ return SWP_NOSIZE | SWP_NOMOVE; > } > if (!SendMessageW( hwnd, WM_QUERYOPEN, 0, 0 )) return SWP_NOSIZE | SWP_NOMOVE; > swpFlags |= SWP_NOCOPYBITS; >@@ -924,8 +917,8 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect ) > > if (!(old_style & WS_MINIMIZE)) swpFlags |= SWP_STATECHANGED; > SetRect( rect, wpl.ptMinPosition.x, wpl.ptMinPosition.y, >- wpl.ptMinPosition.x + GetSystemMetrics(SM_CXMINIMIZED), >- wpl.ptMinPosition.y + GetSystemMetrics(SM_CYMINIMIZED) ); >+ wpl.ptMinPosition.x + GetSystemMetrics(SM_CXICON), >+ wpl.ptMinPosition.y + GetSystemMetrics(SM_CYICON) ); > swpFlags |= SWP_NOCOPYBITS; > break; > >@@ -1147,8 +1140,6 @@ static BOOL show_window( HWND hwnd, INT cmd ) > /* if previous state was minimized Windows sets focus to the window */ > if (style & WS_MINIMIZE) SetFocus( hwnd ); > >- if ((cmd == SW_RESTORE) || (cmd == SW_SHOWMAXIMIZED)) >- USER_Driver->pDropWindow( hwnd ); > return wasVisible; > } > >@@ -1214,24 +1205,9 @@ UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd, > > /*********************************************************************** > * GetWindowPlacement (USER32.@) >- * Retrieves the show state and the restored, minimized, >- * and maximized positions of the window >- * >- * PARAMS >- * hwnd [ I] handle to the window >- * wndpl [ I] pointer to the structure that receives the info. > * >- * RETURNS >- * TRUE if succeeds >- * FALSE if failed (FIXME: use GetLastError for get extended error info) >- * >- * NOTES >- * set length field in the WINDOWPLACEMENT before calling the function >- * Win95: >- * Fails if wndpl->length of Win95 (!) apps is invalid. >- * TODO >- * WPF_RESTORETOMAXIMIZED only with SW_SHOWMINIMIZED? >- * check with WS_VISIBLE, WS_HIDE >+ * Win95: >+ * Fails if wndpl->length of Win95 (!) apps is invalid. > */ > BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl ) > { >@@ -1265,7 +1241,8 @@ BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl ) > } > else if (pWnd->dwStyle & WS_MAXIMIZE) > { >- pWnd->max_pos.x = pWnd->max_pos.y = -1; >+ pWnd->max_pos.x = pWnd->rectWindow.left; >+ pWnd->max_pos.y = pWnd->rectWindow.top; > } > else > { >@@ -1346,6 +1323,7 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT f > WINDOWPLACEMENT wp = *wndpl; > > if (flags & PLACE_MIN) make_point_onscreen( &wp.ptMinPosition ); >+ if (flags & PLACE_MAX) make_point_onscreen( &wp.ptMaxPosition ); > if (flags & PLACE_RECT) make_rect_onscreen( &wp.rcNormalPosition ); > > TRACE( "%p: setting min %d,%d max %d,%d normal %s flags %x ajusted to min %d,%d max %d,%d normal %s\n", >@@ -1358,6 +1336,7 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT f > if (!pWnd || pWnd == WND_OTHER_PROCESS || pWnd == WND_DESKTOP) return FALSE; > > if( flags & PLACE_MIN ) pWnd->min_pos = wp.ptMinPosition; >+ if( flags & PLACE_MAX ) pWnd->max_pos = wp.ptMaxPosition; > if( flags & PLACE_RECT) pWnd->normal_rect = wp.rcNormalPosition; > > style = pWnd->dwStyle; >@@ -1373,14 +1352,19 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT f > SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); > } > } >- else if(( flags & PLACE_RECT ) && !( style & WS_MAXIMIZE )) >+ else if( style & WS_MAXIMIZE ) >+ { >+ if (flags & PLACE_MAX) >+ SetWindowPos( hwnd, 0, wp.ptMaxPosition.x, wp.ptMaxPosition.y, 0, 0, >+ SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); >+ } >+ else if( flags & PLACE_RECT ) > SetWindowPos( hwnd, 0, wp.rcNormalPosition.left, wp.rcNormalPosition.top, > wp.rcNormalPosition.right - wp.rcNormalPosition.left, > wp.rcNormalPosition.bottom - wp.rcNormalPosition.top, > SWP_NOZORDER | SWP_NOACTIVATE ); > >- if (!(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_MDICHILD)) >- ShowWindow( hwnd, wndpl->showCmd ); >+ ShowWindow( hwnd, wndpl->showCmd ); > > if (IsIconic( hwnd )) > { >@@ -1409,7 +1393,7 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT f > */ > BOOL WINAPI SetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *wpl ) > { >- UINT flags = PLACE_RECT; >+ UINT flags = PLACE_MAX | PLACE_RECT; > if (!wpl) return FALSE; > if (wpl->flags & WPF_SETMINPOSITION) flags |= PLACE_MIN; > return WINPOS_SetPlacement( hwnd, wpl, flags ); >@@ -1482,7 +1466,7 @@ static BOOL can_activate_window( HWND hwnd ) > style = GetWindowLongW( hwnd, GWL_STYLE ); > if (!(style & WS_VISIBLE)) return FALSE; > if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE; >- return TRUE; >+ return !(style & WS_DISABLED); > } > > >@@ -1515,7 +1499,7 @@ void WINPOS_ActivateOtherWindow(HWND hwnd) > { > if (SetForegroundWindow( hwndTo )) return; > } >-/* if (!SetActiveWindow( hwndTo )) SetActiveWindow(0); */ >+ if (!SetActiveWindow( hwndTo )) SetActiveWindow(0); > } > > >@@ -2055,16 +2039,6 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos ) > > if (!SWP_DoWinPosChanging( winpos, &newWindowRect, &newClientRect )) return FALSE; > >- /* This hack need for delphi applications. Its >- * call SetWindowPos with 0x1816 flags when >- * minimizing or maximizing mdi windows. >- */ >- if (GetWindowLongW(winpos->hwnd, GWL_EXSTYLE) & WS_EX_MDICHILD) >- { >- if (IsIconic(winpos->hwnd) && (winpos->flags == 0x1816)) >- return FALSE; >- } >- > /* Fix redundant flags */ > if (!fixup_flags( winpos )) return FALSE; > >@@ -2081,20 +2055,6 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos ) > if (!set_window_pos( winpos->hwnd, winpos->hwndInsertAfter, winpos->flags, > &newWindowRect, &newClientRect, valid_rects )) > return FALSE; >- else if (winpos->flags & SWP_SHOWWINDOW) >- { >- if (GetWindow( winpos->hwnd, GW_CHILD ) >- || (GetWindowLongW( winpos->hwnd, GWL_STYLE ) & WS_CHILD)) >- { >- RECT rc; >- GetClientRect( winpos->hwnd, &rc ); >- RedrawWindow( winpos->hwnd, &rc, 0, >- (RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN) ); >- } >- else if (GetWindowLongW( winpos->hwnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW) >- SendMessageW( winpos->hwnd, WM_PRINT, (WPARAM)GetDC(winpos->hwnd), >- (LPARAM)(PRF_CLIENT | PRF_ERASEBKGND | PRF_NONCLIENT) ); >- } > > /* erase parent when hiding or resizing child */ > if (!(orig_flags & SWP_DEFERERASE) && >@@ -2104,7 +2064,7 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos ) > { > HWND parent = GetAncestor( winpos->hwnd, GA_PARENT ); > if (!parent || parent == GetDesktopWindow()) parent = winpos->hwnd; >- erase_now( parent, RDW_NOFRAME ); >+ erase_now( parent, 0 ); > } > > if( winpos->flags & SWP_HIDEWINDOW ) >@@ -2662,44 +2622,19 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam ) > else > { > WPARAM wpSizingHit = 0; >- POINT ptg; >- BOOL converted = FALSE; >- >- ptg.x = pt.x; >- ptg.y = pt.y; >- MapWindowPoints(0, parent, &ptg, 1); > > if(!iconic && !DragFullWindows) draw_moving_frame( parent, hdc, &sizingRect, thickframe ); > if (hittest == HTCAPTION) OffsetRect( &sizingRect, dx, dy ); >- if (ON_LEFT_BORDER(hittest) && ((ptg.x >= sizingRect.left && dx > 0) || (ptg.x <= sizingRect.left && dx < 0))) sizingRect.left += dx; >- else if (ON_RIGHT_BORDER(hittest) && ((ptg.x >= sizingRect.right && dx > 0) || (ptg.x <= sizingRect.right && dx < 0))) sizingRect.right += dx; >- if (ON_TOP_BORDER(hittest) && ((ptg.y >= sizingRect.top && dy > 0) || (ptg.y <= sizingRect.top && dy < 0))) sizingRect.top += dy; >- else if (ON_BOTTOM_BORDER(hittest) && ((ptg.y >= sizingRect.bottom && dy > 0) || (ptg.y <= sizingRect.bottom && dy < 0))) sizingRect.bottom += dy; >+ if (ON_LEFT_BORDER(hittest)) sizingRect.left += dx; >+ else if (ON_RIGHT_BORDER(hittest)) sizingRect.right += dx; >+ if (ON_TOP_BORDER(hittest)) sizingRect.top += dy; >+ else if (ON_BOTTOM_BORDER(hittest)) sizingRect.bottom += dy; > capturePoint = pt; > >- /* convert to screen coordinates */ >- if(parent) >- { >- POINT* p = (POINT*) &sizingRect; >- ClientToScreen( parent, p ); >- ClientToScreen( parent, ++p ); >- converted = TRUE; >- } >- > /* determine the hit location */ > if (hittest >= HTLEFT && hittest <= HTBOTTOMRIGHT) >- { > wpSizingHit = WMSZ_LEFT + (hittest - HTLEFT); >- SendMessageW( hwnd, WM_SIZING, wpSizingHit, (LPARAM)&sizingRect ); >- } >- else if (hittest == HTCAPTION) >- { >- SendMessageW( hwnd, WM_MOVING, wpSizingHit, (LPARAM)&sizingRect ); >- } >- >- /* convert back to client coordinates id needed */ >- if(converted) >- MapWindowPoints( 0, parent, (POINT*)&sizingRect, 2 ); >+ SendMessageW( hwnd, WM_SIZING, wpSizingHit, (LPARAM)&sizingRect ); > > if (!iconic) > { >diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c >index 2d20922..b06e93d 100644 >--- a/dlls/user32/winproc.c >+++ b/dlls/user32/winproc.c >@@ -33,10 +33,6 @@ > #include "user_private.h" > #include "wine/unicode.h" > #include "wine/debug.h" >-#include "wine/exception.h" >- >-#define ETERSOFT_FUNC_DEFWND >-#include "wine/etersoft.h" > > WINE_DECLARE_DEBUG_CHANNEL(msg); > WINE_DECLARE_DEBUG_CHANNEL(relay); >@@ -176,7 +172,6 @@ static inline WINDOWPROC *alloc_winproc( WNDPROC func, BOOL unicode ) > } > > #ifdef __i386__ >- > /* Some window procedures modify register they shouldn't, or are not > * properly declared stdcall; so we need a small assembly wrapper to > * call them. */ >@@ -232,19 +227,6 @@ static WPARAM map_wparam_char_WtoA( WPARAM wParam, DWORD len ) > return MAKEWPARAM( ch[0], HIWORD(wParam) ); > } > >-static LONG WINAPI EventHandler(EXCEPTION_POINTERS *eptr) >-{ >- if (eptr->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) >- { >- BYTE buf[1]; >- SIZE_T nbyte; >- >- /* Safe memory read. It generate the SetLastError if the fail occured */ >- ReadProcessMemory(GetCurrentProcess(), (LPCVOID)eptr->ExceptionRecord->ExceptionInformation[1], (LPVOID)&buf, 1, &nbyte); >- } >- return EXCEPTION_EXECUTE_HANDLER; >-} >- > /* call a 32-bit window procedure */ > static LRESULT call_window_proc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result, void *arg ) > { >@@ -257,18 +239,7 @@ static LRESULT call_window_proc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRES > DPRINTF( "%04x:Call window proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx)\n", > GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), wp, lp ); > >- __TRY >- { >- *result = WINPROC_wrapper( proc, hwnd, msg, wp, lp ); >- } >- __EXCEPT(EventHandler) >- { >- if (!GetLastError()) >- *result = WINPROC_wrapper( proc, hwnd, msg, wp, lp ); >- else >- *result = 0; >- } >- __ENDTRY >+ *result = WINPROC_wrapper( proc, hwnd, msg, wp, lp ); > > if (TRACE_ON(relay)) > DPRINTF( "%04x:Ret window proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx) retval=%08lx\n", >@@ -626,15 +597,6 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg, > SPY_GetMsgName(msg, hwnd), msg ); > break; > >- /* Eterhack: prevent crash 1c80 when create html document (#3130) */ >- case EVENT_OBJECT_SHOW: >- LOADETER_FUNC(etersoft_1version); >- if (etersoft_1version && etersoft_1version() == 8) >- { >- FIXME("Eterhack: skip EVENT_OBJECT_SHOW message\n"); >- break; >- } >- > default: > ret = callback( hwnd, msg, wParam, lParam, result, arg ); > break; >@@ -976,8 +938,6 @@ BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, > * > * ECMA-234, Win32 > */ >-extern int etersoft_mousemove; >- > LRESULT WINAPI CallWindowProcA( > WNDPROC func, /* [in] window procedure */ > HWND hwnd, /* [in] target window */ >@@ -987,33 +947,11 @@ LRESULT WINAPI CallWindowProcA( > ) { > WINDOWPROC *proc; > LRESULT result; >- static UINT oldmsg; >+ > if (!func) return 0; >- >- LOADETER_FUNC(etersoft_fixdefwnd); >- if (msg ==0x363 && etersoft_fixdefwnd) >- if (etersoft_fixdefwnd(msg, etersoft_mousemove, oldmsg)) { >- oldmsg = msg; >- return 0; >- } >- oldmsg = msg; > > if (!(proc = handle_to_proc( func ))) >- { >- char lpszClass[16]; >- WNDPROC awnd = NULL; >- if (msg==WM_NCDESTROY) { >- GetClassNameA(hwnd, lpszClass, 16); >- if (!strcmp(lpszClass, "ListView")) { >- FIXME("PROCESSING LV's MESSAGE \n"); >- awnd = (WNDPROC)GetClassLongA(hwnd, GCLP_WNDPROC); >- } >- } >- /* Skip recursion */ >- if (func == awnd) return 0; >- > call_window_proc( hwnd, msg, wParam, lParam, &result, func ); >- } > else if (proc == WINPROC_PROC16) > wow_handlers.call_window_proc( hwnd, msg, wParam, lParam, &result, func ); > else if (proc->procA) >-- >1.7.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 6061
:
1851
|
1852
| 1853