mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[0.4.7][NTUSER] Port back minor improvements
0.4.15-dev-3341-g4bc95812fd
defwnd.c Mark default as unreachable. 0.4.15-dev-316-g938df97b54
nonclient.c NC_IconForWindow(): Remove redundant if() (#2842) and: -defwnd.c: delete a malformed TRACE() which had a format string, but no argument. -sysparams.c: A single line from 0.4.14-dev-676-g9ce12f0b4c
avoiding a wcslen() call in SpiLoadTimeOut()
This commit is contained in:
parent
d85a921c6f
commit
213680fe3c
3 changed files with 11 additions and 15 deletions
|
@ -401,20 +401,19 @@ UserPaintCaption(PWND pWnd, INT Flags)
|
||||||
{
|
{
|
||||||
if (pWnd->state & WNDS_HASCAPTION && pWnd->head.pti->MessageQueue == gpqForeground)
|
if (pWnd->state & WNDS_HASCAPTION && pWnd->head.pti->MessageQueue == gpqForeground)
|
||||||
Flags |= DC_ACTIVE;
|
Flags |= DC_ACTIVE;
|
||||||
/*
|
/*
|
||||||
* When themes are not enabled we can go on and paint the non client area.
|
* When themes are not enabled we can go on and paint the non client area.
|
||||||
* However if we do that with themes enabled we will draw a classic frame.
|
* However if we do that with themes enabled we will draw a classic frame.
|
||||||
* This is solved by sending a themes specific message to notify the themes
|
* This is solved by sending a themes specific message to notify the themes
|
||||||
* engine that the caption needs to be redrawn
|
* engine that the caption needs to be redrawn
|
||||||
*/
|
*/
|
||||||
if (gpsi->dwSRVIFlags & SRVINFO_APIHOOK)
|
if (gpsi->dwSRVIFlags & SRVINFO_APIHOOK)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This will cause uxtheme to either paint the themed caption or call
|
* This will cause uxtheme to either paint the themed caption or call
|
||||||
* RealUserDrawCaption in order to draw the classic caption when themes
|
* RealUserDrawCaption in order to draw the classic caption when themes
|
||||||
* are disabled but the themes service is enabled
|
* are disabled but the themes service is enabled
|
||||||
*/
|
*/
|
||||||
TRACE("UDCB Flags %08x\n");
|
|
||||||
co_IntSendMessage(UserHMGetHandle(pWnd), WM_NCUAHDRAWCAPTION, Flags, 0);
|
co_IntSendMessage(UserHMGetHandle(pWnd), WM_NCUAHDRAWCAPTION, Flags, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -436,7 +435,7 @@ DefWndSetIcon(PWND pWnd, WPARAM wParam, LPARAM lParam)
|
||||||
HICON hIcon, hIconSmall, hIconOld;
|
HICON hIcon, hIconSmall, hIconOld;
|
||||||
|
|
||||||
if ( wParam > ICON_SMALL2 )
|
if ( wParam > ICON_SMALL2 )
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -486,8 +485,7 @@ DefWndGetIcon(PWND pWnd, WPARAM wParam, LPARAM lParam)
|
||||||
case ICON_SMALL2:
|
case ICON_SMALL2:
|
||||||
hIconRet = UserGetProp(pWnd, gpsi->atomIconSmProp, TRUE);
|
hIconRet = UserGetProp(pWnd, gpsi->atomIconSmProp, TRUE);
|
||||||
break;
|
break;
|
||||||
default:
|
DEFAULT_UNREACHABLE;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return (LRESULT)hIconRet;
|
return (LRESULT)hIconRet;
|
||||||
}
|
}
|
||||||
|
|
|
@ -626,7 +626,7 @@ PCURICON_OBJECT FASTCALL NC_IconForWindow( PWND pWnd )
|
||||||
// it does not use the default icon! And it does not check for DS_MODALFRAME.
|
// it does not use the default icon! And it does not check for DS_MODALFRAME.
|
||||||
if (!hIcon && !(pWnd->ExStyle & WS_EX_DLGMODALFRAME))
|
if (!hIcon && !(pWnd->ExStyle & WS_EX_DLGMODALFRAME))
|
||||||
{
|
{
|
||||||
if (!hIcon) hIcon = gpsi->hIconSmWindows; // Both are IDI_WINLOGO Small
|
hIcon = gpsi->hIconSmWindows; // Both are IDI_WINLOGO Small
|
||||||
if (!hIcon) hIcon = gpsi->hIconWindows; // Reg size.
|
if (!hIcon) hIcon = gpsi->hIconWindows; // Reg size.
|
||||||
}
|
}
|
||||||
if (hIcon)
|
if (hIcon)
|
||||||
|
@ -1181,7 +1181,7 @@ LRESULT NC_HandleNCCalcSize( PWND Wnd, WPARAM wparam, RECTL *Rect, BOOL Suspende
|
||||||
SIZE WindowBorders;
|
SIZE WindowBorders;
|
||||||
RECT OrigRect;
|
RECT OrigRect;
|
||||||
LONG Style = Wnd->style;
|
LONG Style = Wnd->style;
|
||||||
LONG exStyle = Wnd->ExStyle;
|
LONG exStyle = Wnd->ExStyle;
|
||||||
|
|
||||||
if (Rect == NULL)
|
if (Rect == NULL)
|
||||||
{
|
{
|
||||||
|
@ -1558,7 +1558,7 @@ NC_HandleNCLButtonDblClk(PWND pWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PMENU SysMenu = IntGetSystemMenu(pWnd, FALSE);
|
PMENU SysMenu = IntGetSystemMenu(pWnd, FALSE);
|
||||||
UINT state = IntGetMenuState(UserHMGetHandle(SysMenu), SC_CLOSE, MF_BYCOMMAND);
|
UINT state = IntGetMenuState(UserHMGetHandle(SysMenu), SC_CLOSE, MF_BYCOMMAND);
|
||||||
|
|
||||||
/* If the close item of the sysmenu is disabled or not present do nothing */
|
/* If the close item of the sysmenu is disabled or not present do nothing */
|
||||||
if ((state & (MF_DISABLED | MF_GRAYED)) || (state == 0xFFFFFFFF))
|
if ((state & (MF_DISABLED | MF_GRAYED)) || (state == 0xFFFFFFFF))
|
||||||
break;
|
break;
|
||||||
|
@ -1577,7 +1577,7 @@ NC_HandleNCLButtonDblClk(PWND pWnd, WPARAM wParam, LPARAM lParam)
|
||||||
*
|
*
|
||||||
* Handle a WM_NCRBUTTONDOWN message. Called from DefWindowProc().
|
* Handle a WM_NCRBUTTONDOWN message. Called from DefWindowProc().
|
||||||
*/
|
*/
|
||||||
LRESULT NC_HandleNCRButtonDown( PWND pwnd, WPARAM wParam, LPARAM lParam )
|
LRESULT NC_HandleNCRButtonDown(PWND pwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
INT hittest = wParam;
|
INT hittest = wParam;
|
||||||
|
|
|
@ -93,8 +93,6 @@ static const WCHAR* KEY_KDBPREF = L"Control Panel\\Accessibility\\Keyboard Prefe
|
||||||
static const WCHAR* KEY_SCRREAD = L"Control Panel\\Accessibility\\Blind Access";
|
static const WCHAR* KEY_SCRREAD = L"Control Panel\\Accessibility\\Blind Access";
|
||||||
static const WCHAR* VAL_ON = L"On";
|
static const WCHAR* VAL_ON = L"On";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Loading the settings ******************************************************/
|
/** Loading the settings ******************************************************/
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -146,7 +144,7 @@ SpiLoadTimeOut(VOID)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (wcslen(szApplicationName) == 0) return 0;
|
if (szApplicationName[0] == 0) return 0;
|
||||||
return SpiLoadInt(KEY_DESKTOP, VAL_SCRTO, 0);
|
return SpiLoadInt(KEY_DESKTOP, VAL_SCRTO, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -933,7 +931,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
||||||
|
|
||||||
/* Fixup user's structure size */
|
/* Fixup user's structure size */
|
||||||
metrics->cbSize = sizeof(NONCLIENTMETRICSW);
|
metrics->cbSize = sizeof(NONCLIENTMETRICSW);
|
||||||
|
|
||||||
if (!SpiSet(&gspv.ncm, metrics, sizeof(NONCLIENTMETRICSW), fl))
|
if (!SpiSet(&gspv.ncm, metrics, sizeof(NONCLIENTMETRICSW), fl))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue