mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 16:35:49 +00:00
make does like tabs, right? Fix build.
svn path=/trunk/; revision=34540
This commit is contained in:
parent
44e8888c47
commit
702a9bb706
10 changed files with 175 additions and 95 deletions
|
@ -167,20 +167,20 @@ all: $(ROS_AUTOMAKE)
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
||||||
ifeq ($(HOST),)
|
ifeq ($(HOST),)
|
||||||
ifeq ($(word 1,$(shell gcc -dumpmachine)),mingw32)
|
ifeq ($(word 1,$(shell gcc -dumpmachine)),mingw32)
|
||||||
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
|
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
|
||||||
export OSTYPE = msys
|
export OSTYPE = msys
|
||||||
HOST=mingw32-linux
|
HOST=mingw32-linux
|
||||||
HOST_CFLAGS+=-fshort-wchar
|
HOST_CFLAGS+=-fshort-wchar
|
||||||
HOST_CPPFLAGS+=-fshort-wchar
|
HOST_CPPFLAGS+=-fshort-wchar
|
||||||
else
|
else
|
||||||
HOST=mingw32-windows
|
HOST=mingw32-windows
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
HOST=mingw32-linux
|
HOST=mingw32-linux
|
||||||
HOST_CFLAGS+=-fshort-wchar
|
HOST_CFLAGS+=-fshort-wchar
|
||||||
HOST_CPPFLAGS+=-fshort-wchar
|
HOST_CPPFLAGS+=-fshort-wchar
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Default to half-verbose mode
|
# Default to half-verbose mode
|
||||||
|
|
|
@ -742,9 +742,13 @@ DefWndTrackScrollBar(HWND Wnd, WPARAM wParam, POINT Pt)
|
||||||
LRESULT
|
LRESULT
|
||||||
DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
WINDOWPLACEMENT wp;
|
// WINDOWPLACEMENT wp;
|
||||||
POINT Pt;
|
POINT Pt;
|
||||||
|
|
||||||
|
// ATM, This is for Hook call.
|
||||||
|
if (NtUserMessageCall( hWnd, WM_SYSCOMMAND, wParam, lParam, 0, NUMC_DEFWINDOWPROC, FALSE))
|
||||||
|
return 0;
|
||||||
|
|
||||||
switch (wParam & 0xfff0)
|
switch (wParam & 0xfff0)
|
||||||
{
|
{
|
||||||
case SC_MOVE:
|
case SC_MOVE:
|
||||||
|
@ -752,28 +756,40 @@ DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
DefWndDoSizeMove(hWnd, wParam);
|
DefWndDoSizeMove(hWnd, wParam);
|
||||||
break;
|
break;
|
||||||
case SC_MINIMIZE:
|
case SC_MINIMIZE:
|
||||||
wp.length = sizeof(WINDOWPLACEMENT);
|
FIXME("SysCommand SC_MINIMIZE\n");
|
||||||
|
/* wp.length = sizeof(WINDOWPLACEMENT);
|
||||||
if(GetWindowPlacement(hWnd, &wp))
|
if(GetWindowPlacement(hWnd, &wp))
|
||||||
{
|
{
|
||||||
wp.showCmd = SW_MINIMIZE;
|
wp.showCmd = SW_MINIMIZE;
|
||||||
SetWindowPlacement(hWnd, &wp);
|
SetWindowPlacement(hWnd, &wp);
|
||||||
}
|
}*/
|
||||||
|
if (hWnd == GetForegroundWindow())
|
||||||
|
ShowOwnedPopups(hWnd,FALSE);
|
||||||
|
ShowWindow( hWnd, SW_MINIMIZE );
|
||||||
break;
|
break;
|
||||||
case SC_MAXIMIZE:
|
case SC_MAXIMIZE:
|
||||||
wp.length = sizeof(WINDOWPLACEMENT);
|
FIXME("SysCommand SC_MAXIMIZE\n");
|
||||||
|
/* wp.length = sizeof(WINDOWPLACEMENT);
|
||||||
if(GetWindowPlacement(hWnd, &wp))
|
if(GetWindowPlacement(hWnd, &wp))
|
||||||
{
|
{
|
||||||
wp.showCmd = SW_MAXIMIZE;
|
wp.showCmd = SW_MAXIMIZE;
|
||||||
SetWindowPlacement(hWnd, &wp);
|
SetWindowPlacement(hWnd, &wp);
|
||||||
}
|
}*/
|
||||||
|
if (IsIconic(hWnd) && hWnd == GetForegroundWindow())
|
||||||
|
ShowOwnedPopups(hWnd,TRUE);
|
||||||
|
ShowWindow( hWnd, SW_MAXIMIZE );
|
||||||
break;
|
break;
|
||||||
case SC_RESTORE:
|
case SC_RESTORE:
|
||||||
wp.length = sizeof(WINDOWPLACEMENT);
|
FIXME("SysCommand SC_RESTORE\n");
|
||||||
|
/* wp.length = sizeof(WINDOWPLACEMENT);
|
||||||
if(GetWindowPlacement(hWnd, &wp))
|
if(GetWindowPlacement(hWnd, &wp))
|
||||||
{
|
{
|
||||||
wp.showCmd = SW_RESTORE;
|
wp.showCmd = SW_RESTORE;
|
||||||
SetWindowPlacement(hWnd, &wp);
|
SetWindowPlacement(hWnd, &wp);
|
||||||
}
|
}*/
|
||||||
|
if (IsIconic(hWnd) && hWnd == GetForegroundWindow())
|
||||||
|
ShowOwnedPopups(hWnd,TRUE);
|
||||||
|
ShowWindow( hWnd, SW_RESTORE );
|
||||||
break;
|
break;
|
||||||
case SC_CLOSE:
|
case SC_CLOSE:
|
||||||
SendMessageA(hWnd, WM_CLOSE, 0, 0);
|
SendMessageA(hWnd, WM_CLOSE, 0, 0);
|
||||||
|
@ -1410,7 +1426,8 @@ User32DefWindowProc(HWND hWnd,
|
||||||
|
|
||||||
case WM_SHOWWINDOW:
|
case WM_SHOWWINDOW:
|
||||||
{
|
{
|
||||||
NtUserMessageCall( hWnd, Msg, wParam, lParam, 0, NUMC_DEFWINDOWPROC, FALSE);
|
if (lParam) // Call when it is necessary.
|
||||||
|
NtUserMessageCall( hWnd, Msg, wParam, lParam, 0, NUMC_DEFWINDOWPROC, FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1617,6 +1617,7 @@ SetWindowPos(HWND hWnd,
|
||||||
int cy,
|
int cy,
|
||||||
UINT uFlags)
|
UINT uFlags)
|
||||||
{
|
{
|
||||||
|
FIXME("SetWindowPos\n");
|
||||||
return NtUserSetWindowPos(hWnd,hWndInsertAfter, X, Y, cx, cy, uFlags);
|
return NtUserSetWindowPos(hWnd,hWndInsertAfter, X, Y, cx, cy, uFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1713,6 +1714,7 @@ BOOL STDCALL
|
||||||
ShowWindow(HWND hWnd,
|
ShowWindow(HWND hWnd,
|
||||||
int nCmdShow)
|
int nCmdShow)
|
||||||
{
|
{
|
||||||
|
FIXME("ShowWindow\n");
|
||||||
return NtUserShowWindow(hWnd, nCmdShow);
|
return NtUserShowWindow(hWnd, nCmdShow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,15 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
LRESULT FASTCALL
|
||||||
|
IntDefWinHandleSysCommand( PWINDOW_OBJECT Window, WPARAM wParam, LPARAM lParam )
|
||||||
|
{
|
||||||
|
DPRINT1("hwnd %p WM_SYSCOMMAND %lx %lx\n", Window->hSelf, wParam, lParam );
|
||||||
|
|
||||||
|
if (co_HOOK_CallHooks(WH_CBT, HCBT_SYSCOMMAND, wParam, lParam))
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
Win32k counterpart of User DefWindowProc
|
Win32k counterpart of User DefWindowProc
|
||||||
*/
|
*/
|
||||||
|
@ -25,6 +33,7 @@ IntDefWindowProc(
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
PWINDOW Wnd;
|
PWINDOW Wnd;
|
||||||
|
LRESULT lResult = 0;
|
||||||
|
|
||||||
if (Msg > WM_USER) return 0;
|
if (Msg > WM_USER) return 0;
|
||||||
|
|
||||||
|
@ -33,6 +42,11 @@ IntDefWindowProc(
|
||||||
|
|
||||||
switch (Msg)
|
switch (Msg)
|
||||||
{
|
{
|
||||||
|
case WM_SYSCOMMAND:
|
||||||
|
{
|
||||||
|
lResult = IntDefWinHandleSysCommand( Window, wParam, lParam );
|
||||||
|
break;
|
||||||
|
}
|
||||||
case WM_SHOWWINDOW:
|
case WM_SHOWWINDOW:
|
||||||
{
|
{
|
||||||
if ((Wnd->Style & WS_VISIBLE) && wParam) break;
|
if ((Wnd->Style & WS_VISIBLE) && wParam) break;
|
||||||
|
@ -54,7 +68,7 @@ IntDefWindowProc(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,11 +107,14 @@ IntAddHook(PETHREAD Thread, int HookId, BOOLEAN Global, PWINSTATION_OBJECT WinSt
|
||||||
Hook->Thread = Thread;
|
Hook->Thread = Thread;
|
||||||
Hook->HookId = HookId;
|
Hook->HookId = HookId;
|
||||||
|
|
||||||
W32Thread = ((PW32THREAD)Thread->Tcb.Win32Thread);
|
if (Thread)
|
||||||
ASSERT(W32Thread != NULL);
|
{
|
||||||
W32Thread->Hooks |= HOOKID_TO_FLAG(HookId);
|
W32Thread = ((PW32THREAD)Thread->Tcb.Win32Thread);
|
||||||
if (W32Thread->ThreadInfo != NULL)
|
ASSERT(W32Thread != NULL);
|
||||||
W32Thread->ThreadInfo->Hooks = W32Thread->Hooks;
|
W32Thread->Hooks |= HOOKID_TO_FLAG(HookId);
|
||||||
|
if (W32Thread->ThreadInfo != NULL)
|
||||||
|
W32Thread->ThreadInfo->Hooks = W32Thread->Hooks;
|
||||||
|
}
|
||||||
|
|
||||||
RtlInitUnicodeString(&Hook->ModuleName, NULL);
|
RtlInitUnicodeString(&Hook->ModuleName, NULL);
|
||||||
|
|
||||||
|
@ -318,7 +321,7 @@ co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam)
|
||||||
return IntCallLowLevelHook(HookId, Code, wParam, lParam, Hook);
|
return IntCallLowLevelHook(HookId, Code, wParam, lParam, Hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Hook->Thread != PsGetCurrentThread())
|
if ((Hook->Thread != PsGetCurrentThread()) && (Hook->Thread != NULL))
|
||||||
{
|
{
|
||||||
DPRINT1("Calling hooks in other threads not implemented yet");
|
DPRINT1("Calling hooks in other threads not implemented yet");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -570,7 +573,7 @@ NtUserSetWindowsHookEx(
|
||||||
/* We only (partially) support local WH_CBT hooks and
|
/* We only (partially) support local WH_CBT hooks and
|
||||||
* WH_KEYBOARD_LL/WH_MOUSE_LL hooks for now */
|
* WH_KEYBOARD_LL/WH_MOUSE_LL hooks for now */
|
||||||
if ((WH_CBT != HookId || Global)
|
if ((WH_CBT != HookId || Global)
|
||||||
&& WH_KEYBOARD_LL != HookId && WH_MOUSE_LL != HookId) // && WH_GETMESSAGE != HookId)
|
&& WH_KEYBOARD_LL != HookId && WH_MOUSE_LL != HookId && WH_GETMESSAGE != HookId)
|
||||||
{
|
{
|
||||||
#if 0 /* Removed to get winEmbed working again */
|
#if 0 /* Removed to get winEmbed working again */
|
||||||
UNIMPLEMENTED
|
UNIMPLEMENTED
|
||||||
|
|
|
@ -736,6 +736,7 @@ NtUserCallHwndLock(
|
||||||
|
|
||||||
case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW:
|
case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW:
|
||||||
Ret = co_IntSetForegroundWindow(Window);
|
Ret = co_IntSetForegroundWindow(Window);
|
||||||
|
DPRINT1("Leave NtUserCallHwndLock SetForegroundWindow, ret=%i\n",Ret);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HWNDLOCK_ROUTINE_UPDATEWINDOW:
|
case HWNDLOCK_ROUTINE_UPDATEWINDOW:
|
||||||
|
|
|
@ -3333,6 +3333,7 @@ UserGetWindow(HWND hWnd, UINT Relationship)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GW_HWNDNEXT:
|
case GW_HWNDNEXT:
|
||||||
|
DPRINT1("GW_HWNDNEXT\n");
|
||||||
if (Window->NextSibling)
|
if (Window->NextSibling)
|
||||||
hWndResult = Window->NextSibling->hSelf;
|
hWndResult = Window->NextSibling->hSelf;
|
||||||
break;
|
break;
|
||||||
|
@ -3374,13 +3375,13 @@ NtUserGetWindow(HWND hWnd, UINT Relationship)
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetWindow\n");
|
DPRINT1("Enter NtUserGetWindow\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
RETURN(UserGetWindow(hWnd, Relationship));
|
RETURN(UserGetWindow(hWnd, Relationship));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetWindow, ret=%i\n",_ret_);
|
DPRINT1("Leave NtUserGetWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -4244,7 +4245,7 @@ NtUserSetWindowPos(
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetWindowPos\n");
|
DPRINT1("Enter NtUserSetWindowPos\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -4259,7 +4260,7 @@ NtUserSetWindowPos(
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetWindowPos, ret=%i\n",_ret_);
|
DPRINT1("Leave NtUserSetWindowPos, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -4407,7 +4408,7 @@ NtUserShowWindow(HWND hWnd, LONG nCmdShow)
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserShowWindow\n");
|
DPRINT1("Enter NtUserShowWindow\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -4422,7 +4423,7 @@ NtUserShowWindow(HWND hWnd, LONG nCmdShow)
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserShowWindow, ret=%i\n",_ret_);
|
DPRINT1("Leave NtUserShowWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -306,15 +306,24 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
||||||
Size.x = Wnd->WindowRect.left;
|
Size.x = Wnd->WindowRect.left;
|
||||||
Size.y = Wnd->WindowRect.top;
|
Size.y = Wnd->WindowRect.top;
|
||||||
WinPosInitInternalPos(Window, &Size, &Wnd->WindowRect);
|
WinPosInitInternalPos(Window, &Size, &Wnd->WindowRect);
|
||||||
|
|
||||||
|
if (co_HOOK_CallHooks(WH_CBT, HCBT_MINMAX, (WPARAM)Window->hSelf, ShowFlag))
|
||||||
|
return SWP_NOSIZE | SWP_NOMOVE;
|
||||||
|
|
||||||
if (Wnd->Style & WS_MINIMIZE)
|
if (Wnd->Style & WS_MINIMIZE)
|
||||||
|
{
|
||||||
|
switch (ShowFlag)
|
||||||
{
|
{
|
||||||
if (!co_IntSendMessage(Window->hSelf, WM_QUERYOPEN, 0, 0))
|
case SW_MINIMIZE:
|
||||||
{
|
return SWP_NOSIZE | SWP_NOMOVE;
|
||||||
return(SWP_NOSIZE | SWP_NOMOVE);
|
|
||||||
}
|
|
||||||
SwpFlags |= SWP_NOCOPYBITS;
|
|
||||||
}
|
}
|
||||||
|
if (!co_IntSendMessage(Window->hSelf, WM_QUERYOPEN, 0, 0))
|
||||||
|
{
|
||||||
|
return(SWP_NOSIZE | SWP_NOMOVE);
|
||||||
|
}
|
||||||
|
SwpFlags |= SWP_NOCOPYBITS;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ShowFlag)
|
switch (ShowFlag)
|
||||||
{
|
{
|
||||||
case SW_MINIMIZE:
|
case SW_MINIMIZE:
|
||||||
|
@ -1216,7 +1225,7 @@ co_WinPosSetWindowPos(
|
||||||
if (RgnType != ERROR && RgnType != NULLREGION)
|
if (RgnType != ERROR && RgnType != NULLREGION)
|
||||||
{
|
{
|
||||||
/* old code
|
/* old code
|
||||||
NtGdiOffsetRgn(DirtyRgn, Window->WindowRect.left, Window->WindowRect.top);
|
NtGdiOffsetRgn(DirtyRgn, Window->Wnd->WindowRect.left, Window->Wnd->WindowRect.top);
|
||||||
IntInvalidateWindows(Window, DirtyRgn,
|
IntInvalidateWindows(Window, DirtyRgn,
|
||||||
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
|
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||||
}
|
}
|
||||||
|
@ -1314,7 +1323,7 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
||||||
{
|
{
|
||||||
BOOLEAN WasVisible;
|
BOOLEAN WasVisible;
|
||||||
UINT Swp = 0;
|
UINT Swp = 0;
|
||||||
RECT NewPos;
|
RECT NewPos = {0, 0, 0, 0};
|
||||||
BOOLEAN ShowFlag;
|
BOOLEAN ShowFlag;
|
||||||
// HRGN VisibleRgn;
|
// HRGN VisibleRgn;
|
||||||
PWINDOW Wnd;
|
PWINDOW Wnd;
|
||||||
|
@ -1334,53 +1343,29 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
||||||
}
|
}
|
||||||
Swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
|
Swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
|
||||||
if (Window->hSelf != UserGetActiveWindow())
|
if (Window->hSelf != UserGetActiveWindow())
|
||||||
|
// if (Wnd->Style & WS_CHILD)
|
||||||
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SW_SHOWMINNOACTIVE:
|
case SW_SHOWMINNOACTIVE:
|
||||||
|
case SW_MINIMIZE:
|
||||||
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
case SW_SHOWMINIMIZED:
|
case SW_SHOWMINIMIZED:
|
||||||
Swp |= SWP_SHOWWINDOW;
|
DPRINT1("ShowWindow _MINIMIZE\n");
|
||||||
/* Fall through. */
|
Swp |= SWP_SHOWWINDOW | SWP_FRAMECHANGED;
|
||||||
case SW_MINIMIZE:
|
Swp |= co_WinPosMinMaximize(Window, SW_MINIMIZE, &NewPos);
|
||||||
{
|
// if ((Wnd->Style & WS_MINIMIZE) && WasVisible) return TRUE;
|
||||||
Swp |= SWP_NOACTIVATE;
|
break;
|
||||||
if (!(Wnd->Style & WS_MINIMIZE))
|
|
||||||
{
|
|
||||||
Swp |= co_WinPosMinMaximize(Window, SW_MINIMIZE, &NewPos) |
|
|
||||||
SWP_FRAMECHANGED;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Swp |= SWP_NOSIZE | SWP_NOMOVE;
|
|
||||||
if (! WasVisible)
|
|
||||||
{
|
|
||||||
Swp |= SWP_FRAMECHANGED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case SW_SHOWMAXIMIZED:
|
case SW_SHOWMAXIMIZED:
|
||||||
{
|
DPRINT1("ShowWindow _MAXIMIZE\n");
|
||||||
Swp |= SWP_SHOWWINDOW;
|
if (!WasVisible) Swp |= SWP_SHOWWINDOW;
|
||||||
if (!(Wnd->Style & WS_MAXIMIZE))
|
Swp |= SWP_FRAMECHANGED;
|
||||||
{
|
Swp |= co_WinPosMinMaximize(Window, SW_MAXIMIZE, &NewPos);
|
||||||
Swp |= co_WinPosMinMaximize(Window, SW_MAXIMIZE, &NewPos) |
|
// if ((Wnd->Style & WS_MAXIMIZE) && WasVisible) return TRUE;
|
||||||
SWP_FRAMECHANGED;
|
break;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Swp |= SWP_NOSIZE | SWP_NOMOVE;
|
|
||||||
if (! WasVisible)
|
|
||||||
{
|
|
||||||
Swp |= SWP_FRAMECHANGED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case SW_SHOWNA:
|
case SW_SHOWNA:
|
||||||
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||||
|
@ -1392,27 +1377,32 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SW_SHOWNOACTIVATE:
|
case SW_SHOWNOACTIVATE:
|
||||||
//Swp |= SWP_NOZORDER;
|
|
||||||
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
case SW_SHOWNORMAL:
|
case SW_SHOWNORMAL:
|
||||||
case SW_SHOWDEFAULT:
|
case SW_SHOWDEFAULT:
|
||||||
case SW_RESTORE:
|
case SW_RESTORE:
|
||||||
Swp |= SWP_SHOWWINDOW;
|
DPRINT1("ShowWindow _RESTORE\n");
|
||||||
|
if (!WasVisible) Swp |= SWP_SHOWWINDOW;
|
||||||
if (Wnd->Style & (WS_MINIMIZE | WS_MAXIMIZE))
|
if (Wnd->Style & (WS_MINIMIZE | WS_MAXIMIZE))
|
||||||
{
|
{
|
||||||
Swp |= co_WinPosMinMaximize(Window, SW_RESTORE, &NewPos) |
|
Swp |= SWP_FRAMECHANGED;
|
||||||
SWP_FRAMECHANGED;
|
Swp |= co_WinPosMinMaximize(Window, SW_RESTORE, &NewPos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// if (WasVisible) return TRUE;
|
||||||
Swp |= SWP_NOSIZE | SWP_NOMOVE;
|
Swp |= SWP_NOSIZE | SWP_NOMOVE;
|
||||||
if (! WasVisible)
|
|
||||||
{
|
|
||||||
Swp |= SWP_FRAMECHANGED;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (Wnd->Style & WS_CHILD) Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SW_FORCEMINIMIZE:
|
||||||
|
// Fixme!
|
||||||
|
DPRINT1("Force hung application down! pWindow: %x\n",Window);
|
||||||
|
return WasVisible;
|
||||||
|
default:
|
||||||
|
return WasVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowFlag = (Cmd != SW_HIDE);
|
ShowFlag = (Cmd != SW_HIDE);
|
||||||
|
|
|
@ -869,6 +869,8 @@ PATH_PolyPolygon ( PDC dc, const POINT* pts, const INT* counts, UINT polygons )
|
||||||
ASSERT ( counts );
|
ASSERT ( counts );
|
||||||
ASSERT ( polygons );
|
ASSERT ( polygons );
|
||||||
|
|
||||||
|
if (polygons == 1) return PATH_Polygon ( dc, pts, *counts );
|
||||||
|
|
||||||
pPath = PATH_LockPath( dc->DcLevel.hPath );
|
pPath = PATH_LockPath( dc->DcLevel.hPath );
|
||||||
if (!pPath) return FALSE;
|
if (!pPath) return FALSE;
|
||||||
|
|
||||||
|
@ -879,6 +881,9 @@ PATH_PolyPolygon ( PDC dc, const POINT* pts, const INT* counts, UINT polygons )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startpt.x = 0;
|
||||||
|
startpt.y = 0;
|
||||||
|
|
||||||
for(i = 0, poly = 0; poly < polygons; poly++)
|
for(i = 0, poly = 0; poly < polygons; poly++)
|
||||||
{
|
{
|
||||||
for(point = 0; point < (ULONG) counts[poly]; point++, i++)
|
for(point = 0; point < (ULONG) counts[poly]; point++, i++)
|
||||||
|
@ -886,7 +891,7 @@ PATH_PolyPolygon ( PDC dc, const POINT* pts, const INT* counts, UINT polygons )
|
||||||
pt = pts[i];
|
pt = pts[i];
|
||||||
CoordLPtoDP ( dc, &pt );
|
CoordLPtoDP ( dc, &pt );
|
||||||
if(point == 0) startpt = pt;
|
if(point == 0) startpt = pt;
|
||||||
PATH_AddEntry(pPath, &pt, (point == 0) ? PT_MOVETO : PT_LINETO);
|
PATH_AddEntry(pPath, &pt, (point == 0) ? PT_MOVETO : PT_LINETO);
|
||||||
}
|
}
|
||||||
/* win98 adds an extra line to close the figure for some reason */
|
/* win98 adds an extra line to close the figure for some reason */
|
||||||
PATH_AddEntry(pPath, &startpt, PT_LINETO | PT_CLOSEFIGURE);
|
PATH_AddEntry(pPath, &startpt, PT_LINETO | PT_CLOSEFIGURE);
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include <freetype/ftglyph.h>
|
#include <freetype/ftglyph.h>
|
||||||
#include <freetype/ftoutln.h>
|
#include <freetype/ftoutln.h>
|
||||||
#include <freetype/ftwinfnt.h>
|
#include <freetype/ftwinfnt.h>
|
||||||
|
#include <freetype/ftmodapi.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
@ -136,6 +137,35 @@ static CHARSETINFO FontTci[MAXTCIINDEX] = {
|
||||||
{ SYMBOL_CHARSET, 42 /* CP_SYMBOL */, FS(31)},
|
{ SYMBOL_CHARSET, 42 /* CP_SYMBOL */, FS(31)},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static FT_TrueTypeEngineType (*pFT_Get_TrueType_Engine_Type)(FT_Library);
|
||||||
|
|
||||||
|
static
|
||||||
|
BOOL
|
||||||
|
is_hinting_enabled(void)
|
||||||
|
{
|
||||||
|
/* Use the >= 2.2.0 function if available */
|
||||||
|
if(pFT_Get_TrueType_Engine_Type)
|
||||||
|
{
|
||||||
|
FT_TrueTypeEngineType type = pFT_Get_TrueType_Engine_Type(library);
|
||||||
|
return type == FT_TRUETYPE_ENGINE_TYPE_PATENTED;
|
||||||
|
}
|
||||||
|
#ifdef FT_DRIVER_HAS_HINTER
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FT_Module mod;
|
||||||
|
|
||||||
|
/* otherwise if we've been compiled with < 2.2.0 headers
|
||||||
|
use the internal macro */
|
||||||
|
mod = pFT_Get_Module(library, "truetype");
|
||||||
|
if(mod && FT_DRIVER_HAS_HINTER(mod))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
InitFontSupport(VOID)
|
InitFontSupport(VOID)
|
||||||
{
|
{
|
||||||
|
@ -3295,7 +3325,12 @@ NtGdiGetRasterizerCaps(
|
||||||
OUT LPRASTERIZER_STATUS praststat,
|
OUT LPRASTERIZER_STATUS praststat,
|
||||||
IN ULONG cjBytes)
|
IN ULONG cjBytes)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
static int hinting = -1;
|
||||||
|
|
||||||
|
if(hinting == -1)
|
||||||
|
{
|
||||||
|
hinting = is_hinting_enabled();
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3902,11 +3937,23 @@ NtGdiGetTextMetricsW(
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
NtGdiSetTextJustification(HDC hDC,
|
NtGdiSetTextJustification(HDC hDC,
|
||||||
int BreakExtra,
|
int BreakExtra,
|
||||||
int BreakCount)
|
int BreakCount)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PDC Dc;
|
||||||
return FALSE;
|
PDC_ATTR Dc_Attr;
|
||||||
|
Dc = DC_LockDc(hDC);
|
||||||
|
if (!Dc)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
Dc_Attr = Dc->pDc_Attr;
|
||||||
|
if(!Dc_Attr) Dc_Attr = &Dc->Dc_Attr;
|
||||||
|
|
||||||
|
Dc_Attr->cBreak = BreakCount;
|
||||||
|
Dc_Attr->lBreakExtra = BreakExtra;
|
||||||
|
DC_UnlockDc(Dc);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD STDCALL
|
DWORD STDCALL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue