mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 11:33:31 +08:00
[0.4.13][USER32] Fix some unintended scrollbars CORE-15297, CORE-17778
This ports back: partially 0.4.15-dev-99-gad591d0269
(only the defwnd.c part) which was committed as part of the still unresolved CORE16163 PR2152. It was not enough on its own to fix that. But in return it does properly fix: CORE-15297 [USER32] mIRC 6.35 options dlg - unintended scrollbars that are not clickable and its duplicate CORE-17778 HxD 2.5.0.0 shows a horizontal scrollbar that should not be there For improved formatting reasons I did also port back the: 0.4.15-dev-8022-ga69532ec4a
[USER32] defwnd.c only formatting, no functional change and additionally in the backport I had to strip 1 TRACE, and 1 ERR which actually was a good-path-log to prevent binary size increase. Thanks to that compensation user32.dll binary even slightly shrinks on some branches: user32.dll master RosBEWin2.2.2 GCC8.4.0dbg 1.582.592 (0.4.15-dev-8022-ga69532e) user32.dll 0.4.14 RosBEWin2.2.2 GCC8.4.0dbg 1.551.360 -> 1.550.336 user32.dll 0.4.14 RosBEWin2.1.6 GCC4.7.2dbg 1.444.864 -> 1.444.864 user32.dll 0.4.13 RosBEWin2.1.6 GCC4.7.2dbg 1.441.792 -> 1.441.280 user32.dll 0.4.12 RosBEWin2.1.6 GCC4.7.2dbg 1.452.032 -> 1.452.032 user32.dll 0.4.11 RosBEWin2.1.6 GCC4.7.2dbg 1.449.472 -> 1.448.960 user32.dll 0.4.10 RosBEWin2.1.6 GCC4.7.2dbg 1.431.552 -> 1.431.552 user32.dll 0.4. 9 RosBEWin2.1.6 GCC4.7.2dbg 1.418.752 -> 1.418.752 user32.dll 0.4. 8 RosBEWin2.1.6 GCC4.7.2dbg 1.418.240 -> 1.418.240 user32.dll 0.4. 7 RosBEWin2.1.6 GCC4.7.2dbg 1.415.680 -> 1.415.680
This commit is contained in:
parent
4d8e3cc2b3
commit
6af597196d
@ -1,12 +1,8 @@
|
||||
/*
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: win32ss/user/user32/windows/defwnd.c
|
||||
* PURPOSE: Window management
|
||||
* PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* UPDATE HISTORY:
|
||||
* 06-06-2001 CSH Created
|
||||
* PROGRAMMER: 2001 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*/
|
||||
|
||||
#include <user32.h>
|
||||
@ -160,7 +156,7 @@ DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
case SC_RESTORE:
|
||||
case SC_CLOSE:
|
||||
case SC_HOTKEY:
|
||||
NtUserMessageCall( hWnd, WM_SYSCOMMAND, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
|
||||
NtUserMessageCall(hWnd, WM_SYSCOMMAND, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
@ -169,13 +165,12 @@ DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
if (ISITHOOKED(WH_CBT))
|
||||
{
|
||||
NtUserMessageCall( hWnd, WM_SYSCOMMAND, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
|
||||
NtUserMessageCall(hWnd, WM_SYSCOMMAND, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
|
||||
if (lResult) return 0;
|
||||
}
|
||||
|
||||
switch (wParam & 0xfff0)
|
||||
{
|
||||
|
||||
case SC_VSCROLL:
|
||||
case SC_HSCROLL:
|
||||
{
|
||||
@ -333,7 +328,6 @@ User32DefWindowProc(HWND hWnd,
|
||||
/* This is an undocumented message used by the windows taskbar to
|
||||
display the system menu of windows that belong to other processes. */
|
||||
HMENU menu = GetSystemMenu(hWnd, FALSE);
|
||||
ERR("WM_POPUPSYSTEMMENU\n");
|
||||
if (menu)
|
||||
{
|
||||
SetForegroundWindow(hWnd);
|
||||
@ -543,22 +537,18 @@ User32DefWindowProc(HWND hWnd,
|
||||
|
||||
case WM_INPUTLANGCHANGEREQUEST:
|
||||
{
|
||||
HKL NewHkl;
|
||||
HKL hNewKL;
|
||||
|
||||
if(wParam & INPUTLANGCHANGE_BACKWARD
|
||||
&& wParam & INPUTLANGCHANGE_FORWARD)
|
||||
{
|
||||
if ((wParam & INPUTLANGCHANGE_BACKWARD) && (wParam & INPUTLANGCHANGE_FORWARD))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//FIXME: What to do with INPUTLANGCHANGE_SYSCHARSET ?
|
||||
|
||||
if(wParam & INPUTLANGCHANGE_BACKWARD) NewHkl = (HKL) HKL_PREV;
|
||||
else if(wParam & INPUTLANGCHANGE_FORWARD) NewHkl = (HKL) HKL_NEXT;
|
||||
else NewHkl = (HKL) lParam;
|
||||
|
||||
NtUserActivateKeyboardLayout(NewHkl, 0);
|
||||
if(wParam & INPUTLANGCHANGE_BACKWARD) hNewKL = (HKL)HKL_PREV;
|
||||
else if(wParam & INPUTLANGCHANGE_FORWARD) hNewKL = (HKL)HKL_NEXT;
|
||||
else hNewKL = (HKL)lParam;
|
||||
|
||||
NtUserActivateKeyboardLayout(hNewKL, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -609,7 +599,7 @@ User32DefWindowProc(HWND hWnd,
|
||||
|
||||
if (Flags & UISF_ACTIVE)
|
||||
{
|
||||
WARN("WM_CHANGEUISTATE does not yet support UISF_ACTIVE!\n");
|
||||
WARN("WM_CHANGEUISTATE does not yet support UISF_ACTIVE\n");
|
||||
}
|
||||
|
||||
if (Action == UIS_INITIALIZE)
|
||||
@ -691,7 +681,7 @@ User32DefWindowProc(HWND hWnd,
|
||||
|
||||
if (Flags & UISF_ACTIVE)
|
||||
{
|
||||
WARN("WM_UPDATEUISTATE does not yet support UISF_ACTIVE!\n");
|
||||
WARN("WM_UPDATEUISTATE does not yet support UISF_ACTIVE\n");
|
||||
}
|
||||
|
||||
if (Action == UIS_INITIALIZE)
|
||||
@ -752,10 +742,7 @@ User32DefWindowProc(HWND hWnd,
|
||||
}
|
||||
|
||||
case WM_COPYGLOBALDATA:
|
||||
{
|
||||
TRACE("WM_COPYGLOBALDATA hGlobal %p Size %d Flags 0x%x\n",lParam,wParam,GlobalFlags((HGLOBAL)lParam));
|
||||
return lParam;
|
||||
}
|
||||
|
||||
/* Move to Win32k !*/
|
||||
case WM_SHOWWINDOW:
|
||||
@ -797,7 +784,7 @@ User32DefWindowProc(HWND hWnd,
|
||||
GoSS:
|
||||
{
|
||||
LRESULT lResult;
|
||||
NtUserMessageCall( hWnd, Msg, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, !bUnicode);
|
||||
NtUserMessageCall(hWnd, Msg, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, !bUnicode);
|
||||
return lResult;
|
||||
}
|
||||
}
|
||||
@ -1003,7 +990,7 @@ RealDefWindowProcA(HWND hWnd,
|
||||
break;
|
||||
}
|
||||
|
||||
/* fall through */
|
||||
// fall through
|
||||
default:
|
||||
Result = User32DefWindowProc(hWnd, Msg, wParam, lParam, FALSE);
|
||||
}
|
||||
@ -1042,8 +1029,10 @@ RealDefWindowProcW(HWND hWnd,
|
||||
if (!Wnd->pSBInfo)
|
||||
{
|
||||
SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0};
|
||||
SetScrollInfo( hWnd, SB_HORZ, &si, FALSE );
|
||||
SetScrollInfo( hWnd, SB_VERT, &si, FALSE );
|
||||
if (Wnd->style & WS_HSCROLL)
|
||||
SetScrollInfo(hWnd, SB_HORZ, &si, FALSE);
|
||||
if (Wnd->style & WS_VSCROLL)
|
||||
SetScrollInfo(hWnd, SB_VERT, &si, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1195,10 +1184,7 @@ RealDefWindowProcW(HWND hWnd,
|
||||
}
|
||||
|
||||
LRESULT WINAPI
|
||||
DefWindowProcA(HWND hWnd,
|
||||
UINT Msg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
BOOL Hook, msgOverride = FALSE;
|
||||
LRESULT Result = 0;
|
||||
@ -1225,7 +1211,7 @@ DefWindowProcA(HWND hWnd,
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
ERR("Got exception in hooked DefWindowProcA!\n");
|
||||
ERR("Got exception in hooked DefWindowProcA\n");
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
@ -1235,10 +1221,7 @@ DefWindowProcA(HWND hWnd,
|
||||
}
|
||||
|
||||
LRESULT WINAPI
|
||||
DefWindowProcW(HWND hWnd,
|
||||
UINT Msg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
DefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
BOOL Hook, msgOverride = FALSE;
|
||||
LRESULT Result = 0;
|
||||
@ -1265,7 +1248,7 @@ DefWindowProcW(HWND hWnd,
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
ERR("Got exception in hooked DefWindowProcW!\n");
|
||||
ERR("Got exception in hooked DefWindowProcW\n");
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user