CORE-19305
Change how WM_VSCROLL is handled to allow higher line counts to be passed to EDIT_WM_VScroll.
Use the GetScrollInfo() function to determine vertical scroll position and pass this to EDIT_WM_VScroll.
---------
Co-authored-by: Jose Carlos Jesus <zecarlos1957@hotmail.com>
CORE-20553
Fix PolylineTo and PolyBezierTo based on Wine 10.0.
Include starting point in the "POINTS" variable being passed to PolylineTo and PolyBezierTo.
Handle the starting point as the origin for drawing the lines.
Follow-up of #8846. Now <jpnvkeys.h>
is useless. Minor refactoring and
standardation.
JIRA issue: CORE-19268
- Replace <jpnvkeys.h> usage with
<wine/ime.h> and fix
VK_DBE_ENTERIMECONFIGMODE
naming.
- Remove duplicated
WM_IME_REPORT/IR_* and
UNDETERMINESTRUCT definitions
now provided by wine/ime.h.
- Introduce win3send.c half-
implementing
ImmSendIMEMessageExA/W.
- Add CMake option
IMM_WIN3_SUPPORT (default: ON).
Prepare for CTF IME support.
JIRA issue: CORE-19268
- Add GCS_PRIVATE (0x8000) constant,
COMPSTR_PRIVATE structure, and
CtfImmIsGuidMapEnable prototype
to <imm32_undoc.h>.
- Implement GCS_PRIVATE index in
ImmGetCompositionStringA/W.
A bug fix of FontLink'ed glyph size.
JIRA issue: CORE-20470
- Add FONTLINK_ENTRY structure
and g_FontLinkEntries variable.
- Delete font-link cache mechanism.
- Don't access the registry while
rendering is in progress.
- Request sub-font sizes while
drawing FontLink text.
#8641 introduced some bugs. We revert it.
JIRA issue: CORE-20538
- Delete FONT_LOOKUP_CACHE and
s_FontLookupCacheList.
- Delete FontLookUp_... functions.
- Revert FontLink_PrepareFontInfo and
TextIntRealizeFont functions.
Improve code readability.
JIRA issue: CORE-19268
- Rename CLIENTIMC_UNKNOWN2
flag as CLIENTIMC_LOCKED.
- Delete unused
CLIENTIMC_UNKNOWN4 flag.
- Fix the return value of
Imm32AssignNewLayout function.
There were some design difference
comparing to Windows. Improve
IME Menu compatibility.
JIRA issue: CORE-20142
- Re-implement IME Menu.
- Modify
ImmPutImeMenuItemsIntoMappedFile
prototype.
SendMessageA for IME message
won't work in some situations.
JIRA issue: CORE-19268
Always use SendMessageW instead of
SendMessageA in ImmGenerateMessage.
CORE-20433
The brush returned from WM_CTLCOLORLISTBOX message is ignored when painting the background. This bug can be found at https://bugs.winehq.org/show_bug.cgi?id=2948
Fixed by handling backgound painting in LISTBOX_PaintItem and LISTBOX_Paint functions.
Patch by @I_Kill_Bugs
One visible case is the setup LiveCD error dialog, where the message box button can appear with a wrong bold/garbled look instead of the normal default-pushbutton appearance.
## Root cause
`win32ss/user/user32/controls/button.c` stores button state with `GetWindowLongPtrW` / `SetWindowLongPtrW`, but the control extra-byte layout was still defined as if the first slot were only `sizeof(LONG)`
On 64-bit builds, that causes the stored state to overlap the cached font, image, and UI-state fields.
Supplements commit cac013abef (PR #8104).
CORE-5680
The `EnableHexNumpad` string value is specified in the
`HKEY_CURRENT_USER\Control Panel\Input Method` registry key.
When enabled, the user can enter codepoints in hexadecimal form, using:
- `Alt .xxx` ('dot' prefix), for current ANSI codepage (ACP) codepoints;
- `Alt +xxx` ('plus' prefix), for Unicode codepoints.
These two modes complement the known `Alt xxx` and `Alt 0xxx` decimal forms
for entering codepoints in the current OEM or ACP codepage, respectively.
- Initialize the device extension `IsVgaDriver` field with a single
`IntIsVgaSaveDriver()` call when the video device extension is first
initialized in `IntVideoPortCreateAdapterDeviceObject()`.
- The `IsVgaDriver` field can then be used wherever we previously
invoked `IntIsVgaSaveDriver()` (see e.g. in resource.c)
NOTE: It may be possible to move the `IsVgaDriver` field to the driver
extension structure instead, if it's not possible for miniport drivers
to influence this during calls `VideoPortInitialize()` with a custom-made
registry path (2nd parameter) containing a "\\VgaSave" substring...
(To be investigated.)
Addendum to commits 08a6834075 and 0511e9d869.
- Use the `DPFLTR_VIDEO_ID` debug filter ID, which is the same as what
Windows' videoprt.sys uses, so that tools and people who debug can
easily interoperate between the two.
Addendum to commits 11c95f7b5d (r19801) and 5b799176ba (r31477).
- Use SAL2 annotations.
This problem was noticed by Zombiedeth.
Addendum to commit 89d5a3dbb8 (PR #8451).
There exist buggy 3rd-party miniport drivers, like those for the NVIDIA GeForce
8400 GS card (`nv4_mini.sys` from `181.22_geforce_winxp_32bit_english_whql.exe`)
that invoke the VideoPort Int10 routines (either `VideoPortInt10()`, or the
INT10 interface via `VideoPortQueryServices()`) from their `HwFindAdapter()`
callback (invoked via `VideoPortInitialize()`) or from their `DriverEntry()`.
However, at this point, the VideoPort Int10 services are not fully initialized:
on the x86 port, the VDM memory isn't mapped until later, when the `\Device\VideoX`
is opened by Win32k as part of its initialization in the context of the CSRSS process.
Additionally on the x86 ReactOS port since commit 89d5a3dbb8 (PR #8451), the
X86 emulator is used by default, unless either a registry setting is set to
disable the emulator, or the HAL (e.g. the NT5.x HAL) doesn't export the X86
emulator routines; in these cases the VDM is employed instead.
In the NT5.x builds VideoPort imports the HAL X86 emulator routines at runtime,
since it has to handle their possible absence. However, this importing was
previously delayed up until VideoPort initialized the Int10 services (when
`\Device\VideoX` is opened the first time by Win32k from CSRSS), meaning,
these services and the X86 emulator imports weren't initialized until then.
When booting ReactOS in these conditions with the NVIDIA driver installed,
its too-early `VideoPortInt10()` call was invoking the X86 emulator with no
imports set up, which resulted in the invocation of a NULL function pointer,
leading to a BSOD.
## Proposed changes
- Make the existing `IntInitializeInt10()` function support two invocations:
* When invoked the first time, it initializes the X86 emulator support, by
importing the HAL emulator routines, if applicable.
* When invoked the second+ time, it maps the VDM memory space (done when
`Device\VideoX` is opened by Win32k/CSRSS initialization).
- Actually perform the first `IntInitializeInt10()` invocation in the
`if (!FirstInitialization)` block of `VideoPortInitialize()`.
- Set a `VDMAddressSpaceInitialized` flag to TRUE only when the VDM memory
space is mapped (during the second `IntInitializeInt10()` invocation).
Check this flag in both `IntInt10CallBiosV86()` and `IntInt10CallBiosEmu()`
(x86 build only).
- Adjust two returned status values in `IntInitializeVideoAddressSpace()`.
Follow-up of #8678. Commonize the definition of
LANGID_... values.
JIRA issue: CORE-20243
- Define LANGID_... values for CJK in <cjkcode.h> and
use it.
Make code faster and improve readability.
JIRA issue: N/A
- Avoid buffer allocation by using
stack variables if possible.
- Add IntGetFontDefaultChar helper
function and use it.
Follow-up of #8641. Reduce freetype.c lines.
JIRA issue: CORE-19898
- Follow @HBelusca's review in #8641.
- Move some codes in freetype.c into utils.c.
Ensure we dereference the same parent window object after a user-mode callback. We cache spwndParent in a local before sending messages so a parent change during the callback no longer trips the LIFO reference check.
- Capture the parent window in a local in IntDefWindowProc (WM_APPCOMMAND) and IntSendParentNotify.
- Use the local for UserRefObjectCo, co_IntSendMessage, and UserDerefObjectCo to prevent object mismatches when the parent changes mid-callback.
CORE-17331