* fix CORE-9141 - adding a change to IDEvent after each pass
If the first index is 0 the first returned ID will be 0x8000, which is fine.
Co-authored-by: Joachim Henze <joachim.henze@reactos.org>
A small change before PR #5705 was merged caused a severe downgrade in the snap/unsnap handling. Win key handling should work correctly now.
CORE-19165 CORE-19166
Fixes many Window Snap related bugs and uses the WS_EX2_VERTICALLYMAXIMIZED* styles to remember which edge it is snapped to.
The most significant change is that GetWindowPlacement lies about the normal position when it is snapped, just like Windows.
CORE-19160 CORE-19165 CORE-19166
* [NTUSER] Implement BroadcastSystemMessage with 'Environment' parameter
CORE-19372
CORE-19583
* Changes based on reviewer comments.
* Make sure that lParamMsg has a UNICODE_NULL in it.
* Skip extra handling of 1 word messsages.
Refactoring on keyboard layout.
JIRA issue: CORE-19268
- Delete co_UserActivateKbl function.
Use co_UserActivateKeyboardLayout
function instead of
co_UserActivateKbl in
co_IntLoadKeyboardLayoutEx
function.
- Improve
co_UserActivateKeyboardLayout.
JIRA issue: CORE-19268
- Define ImmFreeLayout parameter special
values (HKL_SWITCH_TO_NON_IME and
HKL_RELEASE_IME) at <imm32_undoc.h>.
- Make ImmFreeLayout parameter an HKL.
JIRA issue: CORE-19268
- Rename KLF_UNLOAD as KL_UNLOAD.
- Move it from win32ss/user/ntuser/input.h
to sdk/include/reactos/undocuser.h.
- Add UKL_NOACTIVATENEXT constant
and use it.
CORE-15298
Use DrawTextW() to correctly render disabled grayed text.
Applies to both dll\win32\comctl32\static.c and win32ss\user\user32\controls\static.c
A similar solution is already used by button.c!BUTTON_DrawLabel().
CORE-17545
Clang 13.0.1 was warning about broken 'Ret' handling.
Also remove an unrelated redundant 'else ...'.
Addendum to commit 6dfa71c487 (r68904).
In order for the NT power manager to interact with the Win32 subsystem (thus the whole rest of the system), the Win32 kernel-mode subsystem provides a mechanism that communicates with the kernel power manager via power callouts (aka power requests as per Windows' PDB symbols).
Such mechanism enters in action as soon as Win32 callout routines are estabilished with the PsEstablishWin32Callouts() function.
The NT power manager, the power policy manager respectively, invokes a power callout to denote an exceptional phenomena as a result of power policies or capabilities changes, turning ON/OFF the display, a system time change has occurred, etc.
Such scenarios are described as power events of which the NT power manager sends a WIN32_POWEREVENT_PARAMETERS packet to Win32k via the estabilished "PowerEventCallout" pointer function callout.
For other callouts that inform the Win32 subsystem of impeding power state changes across the system or devices, these are sent as WIN32_POWERSTATE_PARAMETERS packets with its own separate callout.
The purpose of such mechanism is to give Win32k the opportunity to do power related tasks and alert every application of such power events in accordance with what it gets notified by the NT power manager.
Currently this patch stubplements this mechanism in ROS, it is only just the barebones for now. The development of the Win32 power manager will go in parallel with the kernel power manager development (expand, improve, fix the code of issues that whatever may arise).
So far only the PsW32SystemTime power event is implemented for the moment being. This work was decoupled from PR #5719 to avoid clobbering it too much.
=== TODO ===
- Implement power states management communication with the kernel power manager
- Implement the rest of the power events in IntHandlePowerEventWorker
- Implement power event handling in CSRSS (or WinSrv?) which handles any of the events that could not be handled by Win32k otherwise
- Estabilish the power state callout in PsEstablishWin32Callouts() (currently there is no a pointer function that gets assigned to such callout)
CORE-18969
Don't free the linked font name if it's already NULL. Since it is allocated only once (when loading the font name from Registry), it should be freed only once too. All subsequent freeing attempts will result in invalid pool freeing.
This fixes the 0xC2 BAD_POOL_CALLER bugcheck when trying to resize window (and draw more text) from soundcloud.com in K-Meleon 76.5.4 Goanna engine and when switching between channels (during redrawing the text) in DiscordMessenger v1.06 Beta.
Addendum to 0f9e889736.
CORE-19681
CORE-11569, CORE-19684
Addendum to commit 71bed0f5f8 (PR #7123).
The problem in uxtheme was introduced in commit 685084b63c (as part
of a fix for CORE-17203), because it was a copy-paste and adaptation
of the corresponding code in `ntuser/nonclient.c!NC_DoButton()`.
The bugs in `win32ss/user/ntuser/defwnd.c` (and `nonclient.c` as fixed by
the previous commit) were in turn introduced from the migration of menu
and related code from user32 to win32k, see commit 6dfa71c487 (r68904).
Change 'pWnd->style' to 'pWnd->pcls->style' to check for CS_NOCLOSE.
Incorrect struct field was used for checking previously.
Fixes a bug with Ad Muncher that did not close when clicking on the window
title "X" button while being used with a Classic window style theme.
Patch by I_Kill_Bugs. CORE-11569
Splitted from #7082. Correct behavior of
NtUserSetWindowPlacement function.
JIRA issue: N/A
- Check gptiCurrent->dwExpWinVer in
NtUserSetWindowPlacement function.
- Fix the last error.
This value is needed for
SetWindowPlacement and IMM.
JIRA issue: CORE-19675
JIRA issue: CORE-19268
- Add RtlGetExpWinVer function
into win32ss/user/rtl/image.c.
- Add RtlGetExpWinVer prototype
into win32ss/include/ntuser.h.
- Delete RtlGetExpWinVer
definition in
win32ss/user/user32/windows/window.c.
- Populate THREADINFO.dwExpWinVer
and CLIENTINFO.dwExpWinVer
by using RtlGetExpWinVer in
InitThreadCallback function.
Fixes a bug in Midori 0.5.11 installer which caused bad rendering
that was making the text hard to read (no background).
In Windows it's visible as FillRect(0x89011a1f, 0x0019f87c, 0xabababab),
and in ReactOS as SetBkMode(0xb5010fce, -1546139919).
After a number of attempts to get the same behavior, I haven't found a way
to fix it without a hack to make the installer look identical to Windows.
At least I added handling for the incorrect value in SetBkMode.
This shouldn't matter anywhere. It may not look the same as on Windows,
but the text will at least be readable.
Since my machine performance
became lower, we have to adjust
timeout to get correct pattern of
user32!TileWindows function.
JIRA issue: CORE-19674
Adjust timeout value in QuerySizeFix
function.
Reduce log spams that @julenuri reported.
JIRA issue: CORE-19268
- Use Imm32IsCrossThreadAccess
instead of IS_CROSS_THREAD_HIMC in
ImmSetCompositionWindow function.
- Reduce ERR logging in
NtUserQueryInputContext function.
Fix wrong MAKEINTRESOURCEW() macro usage cases in LoadCursorW() system-wide.
MSDN documentation for this function states we need to use MAKEINTRESOURCEW() macro only for internal application-defined cursors (loaded from the app instance specified by hInstance parameter), but not for system-defined cursors (those begin with IDC_* prefix), in case when hInstance is NULL.
So get rid from MAKEINTRESOURCEW() macro usage for all cases when hInstance parameter is NULL. And on the contrary, when hInstance is valid and points to the application instance, then use it for the resource identifier.
If East Asian people were unable
to see the Latin characters, it
becomes a barrier to mutual
understanding.
FontLink will break that barrier.
JIRA issue: CORE-9616
JIRA issue: CORE-15480
- Modify font substitutes.
- Unify the lock variables.
- Add FONTLINK and
FONTLINK_CHAIN structures.
- Add FontLink_Create and
FontLink_Destroy functions.
- Add FontLink_Chain_Init,
FontLink_Chain_Free,
FontLink_Chain_LoadReg,
FontLink_Chain_Populate, and
FontLink_Chain_FindGlyph
functions.
- Implement FontLink.
- Add font file DroidSansFallback.ttf
for LiveCD.
I have edited some traslation files for the italian language, as the text
looked robotic in the way senteces were written, or in some cases it used
not-really-fitting synonymous or incorrect spelling. The edited strings
are from varius areas of ReactOS. I hope this contribution makes italian
language less strange to native speakers.
- [ACCESS] Improve Italian (it-IT) translation
- [DESK] Improve Italian (it-IT) translation
- [JOY] Improve Italian (it-IT) translation
- [MAIN] Improve Italian (it-IT) translation
- [SYSDM] Improve Italian (it-IT) translation
- [TIMEDATE] Improve Italian (it-IT) translation
- [ACPPAGE] Improve Italian (it-IT) translation
- [DESKADP] Improve Italian (it-IT) translation
- [DEVCPUX] Add Italian (it-IT) translation
- [FONTEXT] Improve Italian (it-IT) translation
- [ZIPFLDR] Improve Italian (it-IT) translation
- [BROWSEUI] Improve Italian (it-IT) translation
- [USER32] Improve Italian (it-IT) translation
- [CONSRV] Improve Italian (it-IT) translation
- [USERSRV] Improve Italian (it-IT) translation
Reviewed-by: Joachim Henze <joachim.henze@reactos.org>
Reviewed-by: Simone Mario Lombardo <me@simonelombardo.com>
Add user32_vista.dll to introduce new NT6+ User32 features without changing the existing User32.dll when compiled as NT5.x. Also implements a stub for GetDpiForWindow(). The GetDpiForWindow() function will be required to Wine-sync common controls to modern Wine versions.
Changes:
Expose GetDpiForWindow() function and USER_DEFAULT_SCREEN_DPI to appropriate versions in winuser.h
Introduce a basic user32_vista library that can be expanded as needed.
Check system integrity by explicitly
releasing the font engine.
JIRA issue: CORE-9616
- Use RTL_STATIC_LIST_HEAD against
g_FontListHead and
g_FontCacheListHead variables and
omit initialization of them.
- Implement FreeFontSupport function.
- Call FreeFontSupport in win32k!
DriverUnload function.
- Fix some usages of
CONTAINING_RECORD macro.
We set "LoadIMM" to zero in order to disable Cicero.
The name of "LoadIMM" is a brain-dead name. This name
means Cicero despite of its name (brain-dead).
They use a human-confusing name intentionally.
JIRA issue: CORE-19320
- Set HKLM\SOFTWARE\Microsoft\Windows NT\
CurrentVersion\IMM:LoadIMM to 0.
- Add warning comments to the brain-dead name "LoadIMM".
There was a mistake of parameter value for NtUserGetThreadState
call in Imm32InquireIme function. This affected the logon process.
JIRA issue: CORE-19320
- Replace THREADSTATE_ISWINLOGON2 with THREADSTATE_ISWINLOGON in
NtUserGetThreadState call in Imm32InquireIme function.
- Rename THREADSTATE_ISWINLOGON2 as THREADSTATE_UNKNOWN_0x10.
- Adapt NtUserGetThreadState to this change.
Improve checks in AlphaBlend and TransparentBlt functions: check whether DCSrc is of DCTYPE_INFO also, to fail in that case properly too.
Spotted by PVS-Studio analysis.
Reference: https://pvs-studio.com/en/blog/posts/cpp/1122/.
Patch by @I_Kill_Bugs
* [NTUSER] Fix double click on title bar icon not closing window
Improve MENU_TrackMenu handling.
Guilty commit:0.4.15-dev-7750-gc17a654 c17a6542ac
CORE-19492
Patch by @I_Kill_Bugs
Add condition into msgqueue along with filter testing to reject messages that are "NotForUs".
Also, do not set AcceptMessage to FALSE, but just keep msgDblClk and idSysPeek values and continue.
CORE-19487
CORE-19538
Support emoji characters and minor characters.
JIRA issue: CORE-19030
NOTE: Not every emoji is supported yet (No ZWJ support). Surrogate pairs only.
NOTE: This feature only works if the appropriate font is selected.
- Add IS_HIGH_SURROGATE and
IS_LOW_SURROGATE macros.
- Add Utf32FromSurrogatePair helper function
to convert a surrogate pair to a UTF-32 code
point.
- Convert the surrogate pairs in the text in
TextIntGetTextExtentPoint, IntGetTextDisposition,
and IntExtTextOutW functions.