Commit graph

1127 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 34600f3ddf
[USER32] Add 'Win:' info to misc/imm.c (#4452)
- Add many Win: comments to misc/imm.c.
- Rename GetImmFileName as User32GetImmFileName.
- Rename bImmInitializing as gbImmInitializing.
- Rename gnImmUnknownFlag1 as gfConIme.
- Formating UpdatePerUserImmEnabling code.
CORE-11700
2022-04-16 14:34:06 +09:00
James Tabor 001e300d92 [Win32SS] Fix Build 2
Fix Build 2
2022-04-15 19:30:59 -05:00
James Tabor b1d27cd0fb [Win32SS] Fix Build
Fix Build
2022-04-15 19:27:50 -05:00
James Tabor 250e5ef38f [ENG] Update Structure
Update GRAPHICS_DEVICE monitor count and video monitor device pointer.
Update dwAccelerationLeve comments.
Updated for printer support.
2022-04-15 19:19:54 -05:00
Hervé Poussineau 9400063aae [WIN32SS] Enable multidisplay driver when required
For now, it is only a stub which returns an error.
2022-04-15 23:09:16 +02:00
Hervé Poussineau f3f4cc0f25 [WIN32SS] Implement EngQueryDeviceAttribute 2022-04-15 23:09:16 +02:00
Hervé Poussineau c89ac107ce [WIN32SS] Handle Graphics acceleration level (registry key Acceleration.Level)
- store the acceleration level in PDEVOBJ
- when searching a pdev, search a pdev with required acceleration level
- disable some functions when not at full acceleration level
  (levels 3 and 5 are not implemented)
2022-04-15 23:09:16 +02:00
Hervé Poussineau 494de7c2df [WIN32SS] Remove now unused code
Initialization of device mode list will be done later, just before switching to graphics mode.

If no graphic display is available, we will now fail when starting first GUI application in
co_IntGraphicsCheck(). Add a bugcheck here to prevent frozen screen.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 2d2824f1b9 [WIN32SS] Implement PDEVOBJ_lChangeDisplaySettings to create initial MDEV
This function can create a MDEV for the whole display (maybe containing multiple
PDEVs), or update settings of a specific PDEV.

- call PDEVOBJ_lChangeDisplaySettings when switching to graphics mode.
- modify EngpGetPDEV to search requested PDEV only in current MDEV
2022-04-15 23:09:16 +02:00
Hervé Poussineau 9db63ad595 [WIN32SS] Add functions related to MDEV (creation, destruction...) 2022-04-15 23:09:16 +02:00
Hervé Poussineau a0cfdcd409 [WIN32SS] Introduce the MDEVOBJ structure
This will be used (later) to store the list of all enabled display devices.

Add a global variable gpmdev (should really be stored in DISPLAYINFO structure)
Replace global variable gppdevPrimary by pmdev->ppdevGlobal.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 0f617ddfbb [WIN32SS] Rewrite EngpCreatePDEV as PDEVOBJ_Create
- change first argument to be a PGRAPHICS_DEVICE instead of a device name
- add ldevtype (for now, only LDEV_DEVICE_DISPLAY is allowed)
- always pass a devmode if ldevtype is LDEV_DEVICE_DISPLAY
- insert the ppdev into gppdevList on success
- change callers to adapt them to new rules
2022-04-15 23:09:16 +02:00
Hervé Poussineau c5fb89dced [WIN32SS] Add PDEVOBJ_vEnableDisplay and PDEVOBJ_bDisplayDisplay
Use them where appropriate.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 34085be22d [WIN32SS] Rename PDEVOBJ_vSwitchPdev to PDEVOBJ_bDynamicModeChange
Even if it currently always succeeds, let it return a boolean for later.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 241e579dfa [WIN32SS] Improve PDEVOBJ_bEnablePDEV/PDEVOBJ_vRelease/PDEVOBJ_pSurface
- use debug channels
- handle a NULL ppdev->pGraphicsDevice
- unreference graphic driver when needed
2022-04-15 23:09:16 +02:00
Hervé Poussineau ded971c425 [WIN32SS] Remove useless parameter dwFlags in EngpFindGraphicsDevice() 2022-04-15 23:09:16 +02:00
Hervé Poussineau 75f4be53df [WIN32SS] Preparation to load internal drivers (ie entry point in win32k)
- Change LDEVOBJ_bEnableDriver to directly take the entry point
  (pGdiDriverInfo not required anymore)
- Add LDEVOBJ_pLoadInternal to load and start an internal driver
2022-04-15 23:09:16 +02:00
Hervé Poussineau 333f3382f6 [WIN32SS] Remove useless prototype (function never existed) 2022-04-15 23:09:16 +02:00
Hervé Poussineau 3cb1dd8ab2 [WIN32SS] Rewrite PDEVOBJ_pdmMatchDevMode to LDEVOBJ_bProbeAndCaptureDevmode
- make it return a new allocated PDEVMODEW instead of a pointer into
  existing PGRAPHICS_DEVICE (usefull when available display modes can
  dynamically change: VirtualBox, RDP, ...)
- update all callers
2022-04-15 23:09:16 +02:00
Hervé Poussineau 21ddeb76d9 [WIN32SS] Extract devmode list query to new function LDEVOBJ_bBuildDevmodeList
LDEVOBJ_bBuildDevmodeList() only queries the available display modes, without
choosing the one to use on the graphic device, and without immediately
creating a PDEV.

Replace first part of EngpPopulateDeviceModeList() function by a call
to this new function LDEVOBJ_bBuildDevmodeList().
Keep second part of EngpPopulateDeviceModeList() function, which
chooses the default display mode.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 7d93362f5a [WIN32SS] Implement LDEVOBJ_ulGetDriverModes
- implement LDEVOBJ_ulGetDriverModes (which get modes from a not yet loaded driver),
  and use it in EngpPopulateDeviceModeList
- remove now useless LDEVOBJ_pdmiGetModes (replaced by LDEVOBJ_ulGetDriverModes)
2022-04-15 23:09:16 +02:00
Hervé Poussineau 3b234cce25 [WIN32SS] Rename EngLoadDriverEx to LDEVOBJ_pLoadDriver 2022-04-15 23:09:16 +02:00
Katayama Hirofumi MZ 3820744a18
[NTUSER][IMM32_APITEST] Associate HIMC to WND (#4451)
- Set the default input context to WND at IntCreateWindow function.
- Add more tests to the himc testcase of imm32_apitest.
CORE-11700
2022-04-15 13:16:50 +09:00
Katayama Hirofumi MZ 05bbbd7d8b
[NTUSER] Dereference spDefaultImc at UserCreateInputContext (#4446)
Dereference pti->spDefaultImc by UserDereferenceObject if pti->spDefaultImc is NULL at UserCreateInputContext function. CORE-11700
2022-04-11 10:53:36 +09:00
Katayama Hirofumi MZ 88c1d8c737
[NTUSER] Set error on NtUserCreateInputContext (#4444)
Set the error code correctly on NtUserCreateInputContext.
CORE-11700
2022-04-10 19:26:19 +09:00
Katayama Hirofumi MZ 0f1e19a7b6
[NTUSER] Simplify IntDestroyInputContext (#4443)
CORE-11700
2022-04-10 17:20:21 +09:00
Katayama Hirofumi MZ eb902e5bee
[NTUSER] Improve NtUserDestroyInputContext etc. (#4442)
CORE-11700
2022-04-10 12:27:38 +09:00
Katayama Hirofumi MZ de38e3be61
[NTUSER][INCLUDE] Add IMC offset info (#4439)
Add C_ASSERT assertions on the offsets of the members of IMC structure. CORE-11700
2022-04-10 07:27:30 +09:00
Hermès Bélusca-Maïto 04eca8e2b2
[WIN32K] Remove incorrect packing specification around _TL, _WIN32THREAD and _THREADINFO structures.
CORE-18140

This was introduced historically in commit 583de66b3 (r7460) to
workaround some compiler problems (or replace already existing
GCC-specific __attribute__((packed)) annotations); however these
structures are in-memory-only, do not describe any on-disk data
format and don't describe hardware-specific data. So they should
have the "natural" alignment of the target platform.

They also have to match the documented layouts at:
https://reactos.org/wiki/Techwiki:Win32k/THREADINFO
https://www.geoffchappell.com/studies/windows/km/win32k/structs/threadinfo/index.htm
at least for the compatible parts that ReactOS shares.
2022-04-09 23:31:44 +02:00
Katayama Hirofumi MZ 4342b84c9a
[IMM32] Add ctf.c for Cicero (#4430)
Preparing of Cicero (modern input method) support.

- Add ctf.c and add some CTF functions.
- Modify the IMM table.
- Modify imm32.spec.
- Rename: s/Imm32FreeImeStates/Imm32DestroyImeModeSaver/.
- Improve Imm32DestroyInputContext.

CORE-11700
2022-04-07 22:55:33 +09:00
Katayama Hirofumi MZ 2f7775c604
[NTUSER] Add 'Win:' comments to ime.c and window.c (#4427)
- Add 'Win:' comments to clarify the Windows-side function names.
CORE-11700
2022-04-06 13:11:57 +09:00
Thomas Faber 9f5cde9cbe
[WIN32K:NTUSER] Remove broken assert in NtUserCreateWindowEx. CORE-18123 2022-04-03 23:44:09 -04:00
Wu Haotian 0c42866e64
[TRANSLATION] Review & update Simplified Chinese (zh-CN) translation (#3933)
Reviewed all Chinese Simplified translation files and updated those
inappropriate or outdated ones.

Co-authored-by: Liu Wenyuan <15816141883@163.com>
Reviewed-by: Chan Chilung <eason066@gmail.com>
Reviewed-by: He Yang <1160386205@qq.com>
Reviewed-by: Zheng Jianping <robsean@126.com>
Reviewed-by: Luo Yufan <njlyf2011@hotmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-03-31 20:30:52 +03:00
Chan Chilung 2752c42f0b
[TRANSLATION] Update Hong Kong Chinese (zh-HK) translation - Part 2 (#4347)
- Added zh-HK translation for following files:
  - [BASE/SERVICES/W32TIME]
  - [BASE/SYSTEM/...] (except CMD console only applications)
  - [FDEBUG]
  - [DLL/CPL/...] (except Wine related applications)
  - [DLL/SHELLEXT/...]
  - [DLL/WIN32/...] (not all applications are translated, and Wine related applications are excluded from this part)
  - [MODULES/ROSAPPS/APPLICATIONS/...] (not all applications are translated)
  - [SCREENSAVERS]
  - [NTVDM]
  - [USERSRV]
- Translation Improvement
- Fix header for zh-TW and zh-HK translation files

Reviewed-by: Luo Yufan <njlyf2011@hotmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-03-31 17:10:21 +03:00
Oleg Dubinskiy 5d81de7d5b
[REACTOS] Update email in all my copyrights (#4415)
Change it to Gmail, because Yandex disabled ua domain, which was used in my previous email.
2022-03-31 01:53:30 +02:00
Hermès Bélusca-Maïto 52275a92bd
[WIN32SS:DISPLAY] Fix some return values (use correct types) in display drivers.
See for example, in DrvEnableSurface(), etc.

TODO: framebufacc's comments need to be "translated" into actual English...
2022-03-19 17:51:44 +01:00
Hermès Bélusca-Maïto 5e93daa9ce
[WIN32SS] Use the DCFLAGS and DCTYPE flags defined in ntgdi/dc.h instead of the old ones in include/ntgdihdl.h
The names of these new flags match the documented ones at
https://reactos.org/wiki/Techwiki:Win32k/DC
https://books.google.hr/books?id=-O92IIF1Bj4C&pg=PA197&lpg=PA197
and the gdikdx debug extension.
2022-03-19 17:26:09 +01:00
Hermès Bélusca-Maïto 1c2b757a64
[WIN32SS:NTUSER] Use kernel handle in W32kOpenFile(). 2022-03-19 17:04:30 +01:00
Julio Carchi ea7c14919e
[NTUSER] Fix Toolbar re-painting when Rebar parent has been altered (#4380) CORE-12342
If a Rebar window is altered by calling either ShowWindow() or UpdateWindow()
then we were only updating the parent and omitting their children windows.

This is closer to the behavior of the very very old SVN r27394 == git f1a7f30 .
And therefore intentionally excludes parts of SVN r27403 == git e2651a0 .

The bots have no complaints about it:
KVM https://reactos.org/testman/compare.php?ids=81266,81290
VBox https://reactos.org/testman/compare.php?ids=81267,81291
2022-03-04 19:40:57 +01:00
Katayama Hirofumi MZ 6ba810c08e [IMM32] s/CLIENTIMC_UNKNOWN1/CLIENTIMC_DESTROY/
CORE-11700
2022-03-03 16:17:07 +09:00
Katayama Hirofumi MZ cfeb498e4f
[NTUSER][IMM32] Fix ValidateHandleNoErr (#4377)
- Add DesktopPtrToUser helper function.
- Fix imm32.ValidateHandleNoErr function.
- Use DesktopHeapAlloc to allocate the IMC, instead of ExAllocatePoolWithTag.
- Use DesktopHeapFree to free the IMC, instead of ExFreePoolWithTag.
CORE-11700, CORE-18049
2022-03-03 09:43:05 +09:00
Mark Jansen 977c129f33
[USER32] SetScrollPos should not bypass UserApiHook
CORE-18048
2022-02-23 20:32:02 +01:00
Oleg Dubinskiy 9ab5d3afb2
[WIN32SS][NTGDI] Remove useless assert (#4370) CORE-17561
Remove useless ASSERT(FALSE); in IntGdiCreateDisplayDC, because it actually does not check anything useful. It only asserts each time when the function is called from DxEngCreateMemoryDC by MS DirectDraw stack (ddraw.dll & dxg.sys).
UNIMPLEMENTED debug print is enough a lot to see that this function is not implemented properly.
CORE-17561
2022-02-18 22:00:57 +01:00
Mark Jansen fd28a69de6
[WIN32SS] Store the scrollbar theming enabled flag in the scrollbar
This ensure we do not rely on usermode for always passing this flag in,
which is a ReactOS specific flag.
Thanks to Doug Lyons for finding the source of the problem.
CORE-17780
2022-02-16 18:43:32 +01:00
Robert Naumann d64ab28b5f
[USER32] Use UINT as parameter for DrawText() (#4357)
Import Wine Commit 0ba1bfb0624d5e95f15499d6cfc9af1910c7c5be by Marcus
Meissner: user32: DrawText gets a 32bit flag, not a 16bit flag.

Fixes CORE-17315 - spottted by I_Kill_Bugs
2022-02-16 00:50:51 +01:00
Katayama Hirofumi MZ 2b2366ab90 [NTUSER] Improve UserFreeInputContext and UserDestroyInputContext
CORE-18044
2022-02-15 19:07:50 +09:00
Katayama Hirofumi MZ 45a4e53fa4
[NTUSER][IMM32] Use Imm32CurrentPti and pool (#4356)
- Use newly-defined Imm32CurrentPti() instead of NtCurrentTeb()->Win32ThreadInfo.
- THREADSTATE_GETTHREADINFO is same as THREADSTATE_UNKNOWN18.
- Use the paged pool to allocate HIMC rather than heap.
- Fix and improve ImmDestroyContext function.
CORE-11700
2022-02-13 15:51:53 +09:00
Katayama Hirofumi MZ b5c9d532e8
[NTUSER][USER32] Implement IntImmProcessKey (#4353)
- Establish the trampoline callback USER32_CALLBACK_IMMPROCESSKEY for imm32!ImmProcessKey function, between NTUSER and IMM32.
- Add IntGetImeCompatFlags helper function.
- Implement co_IntImmProcessKey and IntImmProcessKey functions.
CORE-11700
2022-02-12 08:32:13 +09:00
Katayama Hirofumi MZ bbe5fd5274
[NTUSER] Implement NtUserCheckImeHotKey (#4351)
- Modify NtUserCheckImeHotKey prototype.
- Add IntGetImeHotKeyLanguageScore, IntGetActiveKeyboardLayout, IntGetImeHotKeyByKey, and IntCheckImeHotKey helper functions.
- Implement NtUserCheckImeHotKey function.
CORE-11700
2022-02-10 22:53:28 +09:00
Katayama Hirofumi MZ e52ce89be3 [NTUSER] Refactoring ime.c
s/WINAPI/NTAPI/
CORE-11700
2022-02-09 11:51:27 +09:00
Katayama Hirofumi MZ 5d5cc57869
[NTUSER] Implement NtUserSetImeHotKey (#4350)
- Modify NtUserGetImeHotKey and NtUserSetImeHotKey prototypes.
- Define enum SETIMEHOTKEY_ACTION in <undocuser.h>.
- Define IMEHOTKEY structure in ime.c.
- Add IntGetImeHotKeyLangId, IntAddImeHotKey, IntGetImeHotKeyById, IntGetImeHotKeyByKeyAndLang, IntDeleteImeHotKey, IntFreeImeHotKeys, and IntSetImeHotKey helper functions.
- Implement NtUserGetImeHotKey and NtUserSetImeHotKey functions.
- Cleanup the IME hotkeys at process exit.
CORE-11700
2022-02-09 11:27:44 +09:00
Hermès Bélusca-Maïto 2ae45e0985
[CONCFG:FONT] Implement support for the Windows 10 "__DefaultTTFont__" special FaceName value. (#4337)
This special value tells the console to default to whichever font
is deemed most appropriate for the current code page.

Add Doxygen documentation for FindCachedTTFont().
2022-02-08 15:59:10 +01:00
Hermès Bélusca-Maïto 0b6b0b0021
[CONCFG:FONT] Convert the TT_FONT_ENTRY structure to one similar to MS Terminal's _TT_FONT_LIST. (#4337)
See the definition of struct _TT_FONT_LIST
in https://github.com/microsoft/terminal/blob/main/dep/Console/winconp.h

Add Doxygen documentation.

[CONSOLE.CPL][CONSRV] "fonts cache" -> "font cache".
2022-02-08 15:59:08 +01:00
Hermès Bélusca-Maïto 5d3915d0fc
[CONCFG:FONT][CONSRV] Use a suitable font when changing console output CP; fail if none found. (#4337)
CORE-12451, CORE-17601, CORE-17803
Replaces PR #4281.

When changing the console output code page, check whether the current
font can support it. If not, try to find a suitable font for the new
code page. If none can be found:

- if we are creating a new console, forcefully switch to codepage 437
  (OEM USA) and retry finding a font, falling back to "Terminal" if
  none could be found;

- if we were just changing the current CP, just fail and keep the old
  code page and font.

Rework the console font selection/creation functions for this new job
(see CreateConsoleFontEx() and friends). Elements of implementation
based from https://github.com/microsoft/terminal ; see code for more
information.

Silence the noisy IsValidConsoleFont2() diagnostic messages.

Add Doxygen documentation.

[CONSOLE.CPL] Only add "Terminal" to the enumerated list of faces
+ add a TODO implementation comment.
2022-02-08 15:59:07 +01:00
Hermès Bélusca-Maïto 3e44a5d71c
[KERNEL32][CONSRV] Retrieve the best-suited language ID corresponding to the active console output code page. (#4301)
CORE-17601, CORE-17803
Replaces PR #4281.

Implement SrvGetConsoleLangId() (server-side) and set the new current
thread's locale after connecting to a console, or changing its output
code page.

Based on API tracing on Windows 2003, as well as on comments and code
gathered from: https://github.com/microsoft/terminal

Tests results are listed in PR #4301.
2022-02-08 15:58:02 +01:00
Katayama Hirofumi MZ 9db4437185
[NTUSER] Implement NtUserNotifyIMEStatus (#4345)
- Define "the special virtual keys for Japanese".
- Add UserSetImeConversionKeyState helper function.
- Implement NtUserNotifyIMEStatus function.
CORE-11700
2022-02-08 12:22:08 +09:00
Katayama Hirofumi MZ 61d4b5fd6c
[NTUSER] Cleanup the window lists (#4346)
Cleanup the window lists that are no longer needed at the thread / process termination.
CORE-11700
2022-02-08 12:21:05 +09:00
Katayama Hirofumi MZ 1bc9dda5e6
[NTUSER] Rewrite NtUserDestroyInputContext (#4342)
CORE-11700
2022-02-07 10:45:02 +09:00
Katayama Hirofumi MZ f2c3167db3
[NTUSER] Implement NtUserAssociateInputContext (#4334)
- Add IntReAllocatePoolWithTag function in window.c.
- Define WINDOWLIST structure in "window.h".
- Add IntBuildHwndList and IntFreeHwndList helper functions in window.c.
- Add IntAssociateInputContext and IntAssociateInputContextEx helper functions in ime.c.
- Implement NtUserAssociateInputContext function.
CORE-11700
2022-02-05 20:23:57 +09:00
Joachim Henze bf16435303 [WIN32SS] Remove an ambiguous assert entirely CORE-16738
It popped up very reliably when performing git-clone of the ros sources
while having the taskmgr open in the processes-tab.
Or when building 'ninja bootcd -j1' while having the taskmgr open in the processes-tab.

It is always possible to ignore it and then continue using ros for days without
noticing any side effects.
James Tabor judged the assert to have a "questionable logic".
Giannis who once added it, was also ok with commenting it.

His words:
This assertion isn't something fatal,
the worst thing that can happen from continuing on it would be
to make the thread get awake more times than it should.

It was commented out already on 2020-04-21 via
0.4.14-dev-1519-g 87f6c82d85
2022-02-05 01:06:15 +01:00
Hermès Bélusca-Maïto f79c02bd8a
[CONSRV] Introduce a CON_SET_OUTPUT_CP() macro to simplify setting the console's output CP + associated changes. Simplify ConDrvSetConsoleCP() as well. 2022-02-04 21:35:15 +01:00
Katayama Hirofumi MZ 0519ae0ac5
[NTUSER] Half-implement NtUserSetImeOwnerWindow (#4332)
- Add some code to NtUserSetImeOwnerWindow function.
- Add IntGetTopLevelWindow helper function.
CORE-11700
2022-02-03 13:39:15 +09:00
Katayama Hirofumi MZ 8c6dcdcf81
[USER32] Implement ImeWnd_OnImeSetContext (#4329)
- Modify NtUserSetImeOwnerWindow prototype.
- Add User32GetTopLevelWindow function.
- Add ImeWnd_OnImeSetContext function.
- Implement WM_IME_SETCONTEXT message handling of the IME window.
CORE-11700
2022-02-02 11:58:31 +09:00
Katayama Hirofumi MZ 470aa27610
[NTUSER] Move IMM-related code to ime.c (#4322)
Move the IMM-related code from ntstubs.c into ime.c.
CORE-11700
2022-02-02 11:56:40 +09:00
Katayama Hirofumi MZ 99614febad
[USER32] Add ImeWnd_OnImeSystem (#4327)
- Add WM_IME_SYSTEM message handling of the IME window.
- Modify immtable.h.
CORE-11700
2022-01-31 21:20:08 +09:00
Katayama Hirofumi MZ 173fca6ed6 [NTUSER] UserIsDBCSEnabled: Vietnamese doesn't use DBCS
CORE-11700
2022-01-31 09:33:19 +09:00
Katayama Hirofumi MZ fbab1914a6
[USER32] Don't delay-load-link to imm32.dll (#4328)
Reduce binary size.
- Don't directly call the IMM32 functions. Use IMM_FN instead.
- Modify CMakeLists.txt to unlink imm32.dll.
CORE-11700
2022-01-31 09:30:47 +09:00
Katayama Hirofumi MZ d735373e46 [USER32] Improve RegisterIMEClass function
CORE-11700
2022-01-31 04:21:45 +09:00
Katayama Hirofumi MZ c339105b0d
[NTUSER] Implement GetSystemMetrics.SM_DBCSENABLED (#4317)
- Add UserIsDBCSEnabled helper function.
- Support SM_DBCSENABLED value of GetSystemMetrics function.
CORE-11700
2022-01-30 11:23:22 +09:00
Katayama Hirofumi MZ df8c74e78b
[INCLUDE] Rename <ddk/imm.h> as <ddk/immdev.h> (#4321)
- Rename <ddk/imm.h> as <ddk/immdev.h>.
- Delete sdk/include/reactos/wine/imm.h (this header is confusing and nonsense).
- Changes related to it.
CORE-11700
2022-01-30 09:38:04 +09:00
Hermès Bélusca-Maïto 3b76aa5d19
[CONCFG] Rewrite the InitTTFontCache() registry enumeration loop. 2022-01-30 01:02:09 +01:00
Hermès Bélusca-Maïto f650cbdb68
[CONCFG] IsValidConsoleFont(): Validate font against charset corresponding to selected code page. 2022-01-30 01:02:04 +01:00
Hermès Bélusca-Maïto 1530a678a8
[CONCFG:FONT] Add SAL annotations. 2022-01-30 01:01:58 +01:00
Katayama Hirofumi MZ 3fc83b4361
[USER32] Implement ImeWnd_OnImeControl (#4320)
- Add IMC_GETCONVERSIONMODE, IMC_GETSENTENCEMODE, IMC_GETOPENSTATUS, IMC_GETSOFTKBDPOS, and IMC_SETSOFTKBDPOS macros into <ddk/imm.h>.
- Implement WM_IME_CONTROL message handling of the IME window.
CORE-11700
2022-01-29 10:35:48 +09:00
Katayama Hirofumi MZ 82136b3ee4
[USER32] Implement ImeWnd_OnImeNotify (#4318)
- Modify CMakeLists.txt to include <ddk/imm.h>
- Implement WM_IME_NOTIFY message handling of the IME window.
CORE-11700
2022-01-28 19:21:21 +09:00
Katayama Hirofumi MZ 23bb27037d
[USER32] Implement User32CreateImeUI (#4316)
Implementing Japanese input...
- Add User32CreateImeUIWindow, User32GetImeShowStatus, User32SendImeUIMessage, User32UpdateImcOfImeUI, User32SetImeWindowOfImc and User32NotifyOpenStatus helper functions.
- Add WM_IME_SELECT, WM_IME_COMPOSITION, WM_IME_STARTCOMPOSITION and WM_IME_ENDCOMPOSITION message handling of the IME window.
- Rename ImeWnd_OnDestroy as User32DestroyImeUIWindow.
- Rename CheckIMCForWindow as User32CanSetImeWindowToImc.
- Improve ImeWnd_OnCreate function.
CORE-11700
2022-01-27 21:19:37 +09:00
Katayama Hirofumi MZ fc62d268d2
[USER32] Implement WM_CREATE of IME window (#4314)
Implement handling of WM_CREATE and WM_DESTROY messages of the IME window.
CORE-11700
2022-01-27 07:30:11 +09:00
Katayama Hirofumi MZ 9c8167e90a
[NTUSER] Implement NtUserGetAppImeLevel and NtUserSetAppImeLevel (#4313)
- Add AtomImeLevel atom.
- Modify NtUserSetAppImeLevel prototype.
- Implement NtUserGetAppImeLevel and NtUserSetAppImeLevel functions.
CORE-11700
2022-01-27 07:29:19 +09:00
Hervé Poussineau 963e76fd60 [VIDEOPRT] Fix typo: DEViCEMAP -> DEVICEMAP 2022-01-26 19:30:32 +01:00
Hervé Poussineau 1add6de3e8 [VIDEOPRT] Change case of device registry path written to registry
Change it it two places, to handle when 'UseNewKey' is enabled or disabled.

This fixes the Spice guest agent, which searches 'System' case-sensitively in it.
2022-01-26 19:30:32 +01:00
Hervé Poussineau b80d806e05 [VIDEOPRT] Honour UseNewKey setting in registry
This changes:
- which device key is written to DEVICEMAP\Video
- which registry key is used in VideoPortSetRegistryParameters()

CORE-17896
2022-01-26 19:30:32 +01:00
Katayama Hirofumi MZ 1cad26ad08 [USER32] Fix uninitialized cbTotal
CORE-18025
2022-01-26 08:14:59 +09:00
Katayama Hirofumi MZ 5972c0c18b [USER32] Fix release build C4700 CORE-16287 2022-01-25 21:57:47 +09:00
Katayama Hirofumi MZ 0360abb796
[USER32] Follow-up of #4262 (a47590c) (#4312)
Display icons/cursors correctly without hungup. CORE-16287
2022-01-25 20:41:00 +09:00
Katayama Hirofumi MZ 41b87158ff
[NTUSER] Improve NtUserGetThreadState (#4300)
- Improve enum ThreadStateRoutines.
- Improve NtUserGetThreadState function.
- Improve CLIENTIMC structure.
- Improve imm32 code.
CORE-17732
2022-01-20 11:49:27 +09:00
Julio Carchi 292e6a429f
[NTUSER] Initialize correctly CaretWidth value. (#4297) CORE-13984 CORE-14359 CORE-16624
Fixes:
CORE-13984 LibreOffice Writer shows no blinking caret
CORE-14359 Apache Open Office 4.1.2 SWriter - no blinking Caret
CORE-16624 KVIRC, no blinking caret in configuration edit controls
2022-01-18 00:36:49 +01:00
Katayama Hirofumi MZ ce6da820a4
[NTUSER] Implement NtUserBuildHimcList (#4286)
- Add UserBuildHimcList helper function.
- Implement NtUserBuildHimcList function.
CORE-11700
2022-01-16 09:56:18 +09:00
Katayama Hirofumi MZ 2250ce80f3
[USER32] Adjust the threshold in CascadeWindows (#4283)
Improve the threshold of CascadeWindows function not to make the windows too small.
2022-01-16 09:54:44 +09:00
Hermès Bélusca-Maïto 1ffe431827
[CONSRV] Trivially implement TuiSetCodePage(). CORE-17601 2022-01-15 17:41:36 +01:00
Hermès Bélusca-Maïto 9f201d462d
[BLUE][CONSRV][USETUP] Completely remove support for CAB font extraction from driver, and move it to CONSRV, much like what was done for USETUP.
Addendum to aaa416d3 and 2391e31c.
2022-01-15 17:41:36 +01:00
Hermès Bélusca-Maïto ac2494994b
[CONSRV] Stub out support for terminal-level changing of output code page.
CORE-17601
2022-01-15 17:41:34 +01:00
Chan Chilung 171a920680
[TRANSLATION] Update Chinese Traditional (zh-TW) translation (#4154)
- Added translation for:
  - [W32TIME]
  - [MODE]
  - [TIMEOUT]
  - [MODEMUI]
  - [ARPING]
  - [FRAGINATOR]
  - and more
- Updated existing translation
- [WINNLS] Update cht (zh-TW) and zhh (zh-HK)
- [DOC] Update rules in Chinese translation notes.txt
- Wine translation sync

Some of the punctuation use in WIne has been converted to half-width,
so the punctuation will no longer synced.
2022-01-14 20:22:46 +03:00
Katayama Hirofumi MZ 2ea30b2ed3 [USERSRV][TRANSLATION] Improve Japanese (ja-JP.rc) 2022-01-13 14:09:03 +09:00
Katayama Hirofumi MZ 48827cf6c5 [NTUSER] Follow-up of #4277 (ea1353e)
According to ThFabba, NtUserSetThreadLayoutHandles returns zero.
CORE-11700
2022-01-13 10:41:03 +09:00
Katayama Hirofumi MZ ea1353e4be
[NTUSER] Implement NtUserSetThreadLayoutHandles (#4277)
- Modify NtUserSetThreadLayoutHandles prototype.
- Implement NtUserSetThreadLayoutHandles function.
CORE-11700
2022-01-12 14:48:20 +09:00
Katayama Hirofumi MZ 28959a2dfd [NTUSER] Follow-up of #4271 (36740ca)
- Delete the excessive comments.
- Delete the debugging leftover.
CORE-11700
2022-01-12 14:08:10 +09:00
Katayama Hirofumi MZ 1f44693657
[NTUSER] Implement NtUserSetImeInfoEx (#4276)
- Modify NtUserSetImeInfoEx prototype.
- Add UserSetImeInfoEx helper function.
- Implement NtUserSetImeInfoEx function.
CORE-11700
2022-01-12 12:07:31 +09:00
Katayama Hirofumi MZ 36740ca981
[NTUSER][IMM32] Implement NtUserGetImeInfoEx (#4271)
- Add UserGetImeInfoEx helper function.
- Implement NtUserGetImeInfoEx function by using UserGetImeInfoEx.
- Fix imm32.ImmGetImeInfoEx.
- Modify enum IMEINFOEXCLASS.
CORE-11700
2022-01-12 12:06:24 +09:00
Doug Lyons a47590c9cf
[USER32] Improve icon extraction to handle RIFF formats and Fix crash (#4262)
- Add handling for 'RIFF' formats (for animated cursors). This makes explorer able to display animated cursors.
- Fix crash in extracting icons/cursors.
CORE-16287
2022-01-12 08:03:44 +09:00
Hervé Poussineau 2538583dbe [VIDEOPRT] Query children only when device has been opened
HwGetVideoChildDescriptor callback must be called only after HwInitialize.

CORE-17979
2022-01-06 22:02:07 +01:00
Hervé Poussineau 983d9a1c2a [VBEMP] Disable reporting multiple monitors
It has never worked, and only leads to some infinite loops with some hardware or BIOS configurations.
2022-01-06 20:16:12 +01:00
Hervé Poussineau f03750de6a [VBEMP] Rename to vgapnp.sys
- rename driver vbemp.sys to vgapnp.sys
- rename service VBE to vga
- store settings in non hardware-profile registry key
2022-01-06 20:16:12 +01:00
Hervé Poussineau 073a1ea34c [VGAMP] Rename to vga.sys
- rename driver vgamp.sys to vga.sys
- rename service Vga to VgaSave
- store settings in non hardware-profile registry key
2022-01-06 20:16:12 +01:00
Hervé Poussineau 0d9386d0e0 [VGA_NEW] Disable it for now 2022-01-06 17:47:45 +01:00
Serge Gautherie 40b9ee0ae0
[VIDEOPRT] Match Zw*Key() DesiredAccess values (#4145)
Even if the kernel mode does not care, this makes it clear.
2022-01-06 04:04:09 +03:00
Katayama Hirofumi MZ 8e8f61989a
[NTUSER] Plan A: UserDereferenceObject in UserCreateInputContext (#4247)
- Call UserDereferenceObject function in UserCreateInputContext.
- Don't call UserDereferenceObject against input context at the other places.
CORE-11700
2022-01-05 08:15:32 +09:00
Stanislav Motylkov 27955da7ee
[WIN32K:NTUSER] Fix one more reference leak
Addendum to d5deacd9 and 2a2f8dbe. CORE-11700
2022-01-04 03:12:12 +03:00
Thomas Faber 2a2f8dbebd
[WIN32K:NTUSER] Fix reference leak 2022-01-03 13:25:09 -05:00
Thomas Faber 49bb853b24
[GDI32_VISTA] Move D3DKMT functions out of gdi32. CORE-17433 2022-01-01 12:42:04 -05:00
Katayama Hirofumi MZ 757bed81b1
[NTUSER] Fix KVM and VBox tests (#4235)
KVM and VBox tests was failing since d5deacd
- Check NULL at UserFreeInputContext and UserDestroyInputContext functions.
- Move UserMarkObjectDestroy into the UserDestroyInputContext function.
CORE-11700
2022-01-02 01:40:11 +09:00
Katayama Hirofumi MZ d5deacd903
[NTUSER] Implement NtUserCreateInputContext (#4230)
- Modify NtUserCreateInputContext prototype.
- Add UserCreateInputContext helper function.
- Implement NtUserCreateInputContext function by using UserCreateInputContext.
- Call UserCreateInputContext(0) in InitThreadCallback function to create the default input context.
CORE-11700
2022-01-01 20:59:00 +09:00
Katayama Hirofumi MZ ba3affe5f7
[NTUSER] Implement NtUserUpdateInputContext (#4228)
- Modify NtUserUpdateInputContext prototype.
- Implement NtUserUpdateInputContext function.
- Add enum UPDATE_INPUT_CONTEXT (UIC_*) to undocuser.h.
CORE-11700
2022-01-01 20:57:51 +09:00
Katayama Hirofumi MZ cdf3b5e85a
[NTUSER] Implement NtUserQueryInputContext (#4227)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
- Modify NtUserQueryInputContext prototype.
- Implement NtUserQueryInputContext function.
- Add enum QUERY_INPUT_CONTEXT (QIC_*) to undocuser.h.
CORE-11700
2022-01-01 20:56:50 +09:00
Katayama Hirofumi MZ fcc222c28a
[NTUSER] Implement NtUserDisableThreadIme (#4216)
CORE-11700
2021-12-31 10:20:53 +09:00
Chan Chilung 81db5e1da8
[TRANSLATION] Add Hong Kong Chinese (zh-HK) translation - Part 1 (#3941)
Converted from Cantonese to HK-Style Written Chinese.

Also assign zh-HK translations to the ReactOS Chinese
translation team in the CODEOWNERS file.

Reviewed-by: He Yang <1160386205@qq.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2021-12-30 00:40:57 +03:00
Oleg Dubinskiy dc483bd700
[WIN32SS:ENG] EngCreateBitmap: mark created bitmaps as API bitmaps (#4146)
CORE-17561

Set the API_BITMAP flag for bitmaps created by EngCreateBitmap().

This avoids failure when created bitmap is passed to NtGdiSelectBitmap(), since it checks for this flag and fails if it isn't set.
Otherwise, if failure occurs, the bitmap is hot handled properly.
Setting this flag outside of that function is not an option at all, because it is a public (exported) function, and in many cases it's called directly by the caller (in case with MS DDraw stack, it can be called also by dxg.sys from dxgthk!EngCreateBitmap, which directly calls win32k!EngCreateBitmap).

In particular, it allows Windows XP/2003 DirectDraw stack (ddraw.dll & dxg.sys) to properly work in ReactOS (in software emulation mode), even on real hardware. So now, a lot of DirectX 1-7 apps and games (whose can work withoug hardware acceleation), are working properly with ddraw.dll + dxg.sys replacement! Also Justin Miller (DarkFire01) confirmed that even Direct3D software emulation now also works correctly on real hardware!
2021-12-29 16:51:23 +01:00
Katayama Hirofumi MZ 051561ed17
[NTUSER] Use call procedure handle if available (#4178)
Based on I_Kill_Bugs' patch.
- Use IsCallProcHandle to check if the procedure is a call procedure handle.
- If so, use the call procedure.
CORE-10499
2021-12-23 11:53:18 +09:00
Oleg Dubinskiy 8a6312abda
[WIN32SS][NTDDRAW] Improve DxEngGetDCState type 2 implementation (#4176)
- Use the REGION_Complexity() function to get the actual region complexity instead of just number of rectangles.
- Don't use prgnRao at all, because it is always uninitialized when passed to the function. So in condition between prgnRao and prgnVis, the 2nd one always succeeds.
- Update the comment accordingly.
- Additionally, add a DPRINT to the end of the function, which displays the returned value.

This allows to properly enable and use DirectDraw and Direct3D hardware acceleration with the following MS DirectX components: ddraw.dll, d3d8.dll, d3d9.dll and dxg.sys. As in VM, same on real hardware.
But note that now the bugcheck 0x50 (PAGE_FAULT_IN_NONPAGED_AREA) occurs when executing fullscreen DDraw apps, after switching display mode. It's unhidden by this fix.
Addendum to 855bf46.
CORE-17561
2021-12-20 21:27:13 +01:00
Serge Gautherie d375b7f6c5
[WIN32K:NTUSER] Make sure to hold User Global Lock before mapping desktop heap (#4144)
Addendum to 8c098ee8d.
CORE-17890
2021-12-19 23:34:35 +01:00
Doug Lyons 7d1b50394b
[WIN32SS] Do not remove message from the Msg Queue if it is not for us. (#4129)
CORE-8217
Patch from 'I_Kill_Bugs' contributor.
2021-12-19 16:03:22 +01:00
Katayama Hirofumi MZ f643fb301b [NTUSER] Fix SwitchToThisWindow
Taskbar task buttons were not working correctly due to this bug.
CORE-17911
2021-12-17 11:38:23 +09:00
Katayama Hirofumi MZ e3622ebe4e
[NTGDI] Strictly check pen style (#4164)
- Check the pen style and elegantly fail if the style was wrong.
CORE-13819
2021-12-16 10:47:57 +09:00
Katayama Hirofumi MZ 0b6f3eb8e4
[NTUSER][USER32] Use async way in TileWindows and CascadeWindows (#4167)
Processing asynchronously. CORE-17894
2021-12-16 09:52:02 +09:00
Katayama Hirofumi MZ 55a1c29341
[NTUSER][USER32] Simplify SwitchToThisWindow (#4153)
CORE-17894
2021-12-13 08:14:33 +09:00
Katayama Hirofumi MZ 8c9b6fdb5c
[USER32] Partially fix freezing of Task Switcher (#4148)
- Use SendMessageTimeout instead of SendMessage.
- Use SwitchToThisWindow instead of BringWindowToTop.
- Use ShowWindowAsync instead of ShowWindow.
- Use SWP_ASYNCWINDOWPOS for SetWindowPos.
CORE-17894
2021-12-10 13:37:43 +09:00
Hervé Poussineau 5dc56dd1d6 Revert "[VIDEOPRT] Fix updating of new registry path values"
This reverts commit ecf3416f49.

This commit was meant to fix CORE-17688. While its effectively fixed
the problem, it introduced another regression CORE-17719.

In the mean time, commit c05a45e17e fixed
things properly.

CORE-17719
2021-12-08 18:36:34 +01:00
Katayama Hirofumi MZ ee3659d5d5
[NTUSER][USER32] Simplify user32.IsHungAppWindow (#4150)
Check FNID_GHOST and MsqIsHung. CORE-17894
2021-12-09 00:39:57 +09:00
Katayama Hirofumi MZ 79c926c893
[NTUSER] Implement HSHELL_RUDEAPPACTIVATE notification (#4147)
- Add IntIsWindowFullscreen function to judge whether the window is fullscreen.
- Add IntCheckFullscreen function to notify HSHELL_RUDEAPPACTIVATE if fullscreen.
- Add IntCheckFullscreen call in UpdateShellHook function.
- Add IntCheckFullscreen call in co_WinPosSetWindowPos function.
CORE-16130
2021-12-08 18:26:22 +09:00
Katayama Hirofumi MZ 4a17d4b0c1 [NTGDI] Follow-up of #4137
Revert AddPenLinesBounds. Delete FIXME comments.
CORE-2527, CORE-8366
2021-12-07 08:08:46 +09:00
Katayama Hirofumi MZ 6358c4ac9f
[NTGDI] Support the wide pen (#4137)
- Extend PATH_WidenPath function as PATH_WidenPathEx with the path argument.
- Use PATH_WidenPathEx and PATH_FillPathEx functions to implement wide pen drawing in PATH_StrokePath function.
- Add the code to IntGdiLineTo, IntRectangle, IntGdiPolygon, and IntGdiPolyline in order to stroke the path when the effective wide pen.
FIXME: Boundary rectangle.
CORE-2527, CORE-8366
2021-12-06 20:44:06 +09:00
Katayama Hirofumi MZ f606fecb0d
[NTUSER] Fix where linking newly created window is done (#4127)
Co-authored-by: I_Kill_Bugs <>
CORE-12052
2021-12-04 11:52:38 +09:00
Hermès Bélusca-Maïto 957e566a23
[APITESTS][NTVDM][SPOOLSV] Add the missing ENABLE_EXPORTS property as these EXE targets have function exports.
This became a requirement, following a previous CMake update.
Otherwise the built EXEs would not export their intended functions.

Addendum to commit d8e92b5a (see PR #1335)
CORE-15406

[LOADCONFIG] The GCC rant had nothing to do with GCC, but everything with CMake...

[SPOOLSV] Add the missing exported stubs.
2021-12-04 01:17:32 +01:00
Oleg Dubinskiy c05a45e17e
[WIN32K:ENG] Pass correct display name to EngpFindGraphicsDevice (#4128)
It actually should look like '\\.\DISPLAY<n>' (since it comes from user mode),
which the function expects, and not '\\Device\\Video<n>', like done in the
kernel mode. Otherwise, passing wrong name causes a mismatch.

Fix the problem with video device access (failure with status 0xc0000022 when
trying to open it). Hence, it also fixes the following debug log spam:
'err: Could not open device \Device\Video0, 0xc0000022'.

Addendum to 77e891b8. CORE-17719 CORE-17786
2021-12-01 18:28:45 +03:00
James Tabor 9cff384c22 [User32] Add Back Break with Error Message
Add back missing break. See CORE-17856.
2021-11-27 11:35:42 -06:00
James Tabor a89844f740 [User32] Fix Copy Paste
Pointed out by otya. See CORE-17856.
2021-11-24 09:36:50 -06:00
Denis Malikov db810d8e44
[WIN32SS:NTUSER] Fix window state after restoring snapped window (#4119)
InternalPos.NormalRect is a key data for detecting whether a window was snapped.
Keeping it after restore affecting next snap actions.

CORE-16477
2021-11-23 23:34:03 +01:00
Doug Lyons b538b9abb8
[WIN32K] Fix 'use after free' in NtGdiStretchDIBitsInternal (#4122)
CORE-17861
2021-11-22 02:57:36 +01:00
Thomas Faber 0af3689c2e
[REACTOS] Fix traces with missing arguments.
Courtesy of VS Code Analysis warning C6064:
Missing integer argument to 'DbgPrint' that corresponds to conversion specifier 'N'.
2021-11-21 12:57:35 -05:00
Julio Carchi 9c4397afdf
[USER32] GetQueueStatus() should not return 0 when passing QS_ALLINPUT flag that includes QS_RAWINPUT (#4115)
GTK applications call GetQueueStatus(QS_ALLINPUT), where QS_ALLINPUT
specifies the QS_RAWINPUT flag as well, when these are compiled for
Windows XP+, and they expect the call to succeed on this platform.

On one side, ReactOS does not currently support this flag at all, but
since it claims to be XP/2003-compatible, applications may implicitly
expect the flag to be supported by GetQueueStatus() and the function
*NOT* failing when this flag is set.
(Later GTK apps don't care and just call GetQueueStatus(QS_ALLINPUT)
that includes QS_RAWINPUT, and therefore would fail as well on e.g.
Windows 2000...)

Otherwise, an observable effect is that some versions of libgdk-win32-2.0.0.dll
enter into an infinite loop when calling GetQueueStatus(QS_ALLINPUT),
since this call always failed on ReactOS.

On the other side, however, we should honour our winetests that handle
the presence of the QS_RAWINPUT flag and behave differently accordingly.
But since we do not support QS_RAWINPUT yet, we should keep their old
behaviour where QS_RAWINPUT is unused.

Thus, in order to accomodate both sides, we don't fail the GetQueueStatus()
call, but just set the ERROR_INVALID_FLAGS last error and continue it.


This fixes CORE-15686, CORE-17551 and probably CORE-11850.
Fixes also all user32:TrackMouseEvent tests.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2021-11-20 00:45:35 +01:00
Hermès Bélusca-Maïto 7c8c9e1aba
[WINSPOOL] QS_SENDMESSAGE|QS_ALLEVENTS == QS_ALLINPUT, so use the latter instead. 2021-11-19 21:13:26 +01:00
Joachim Henze f028ca5b08 [WIN32K] Fix a weird control character in dibobj.c CreateDIBPalette() CORE-17848 2021-11-15 03:05:20 +01:00
Katayama Hirofumi MZ 3d78601f39
[WIN32SS][NTUSER] Implement NtUserDestroyInputContext (#4063)
CORE-11700
2021-11-01 15:20:42 +09:00
Thomas Faber 3a323c3de0
[WIN32K] Fix uninitialized bResult in IntExtTextOutW.
Powered by clang-cl.
2021-10-29 22:06:49 -04:00
Thomas Faber 4bc95812fd
[WIN32K] Mark default as unreachable.
Powered by clang-cl.
2021-10-29 22:06:49 -04:00
Thomas Faber 3235e35dee
[WIN32K] Remove unnecessary if in NtUserGetGUIThreadInfo.
This condition is already checked above.
Powered by clang-cl.
2021-10-29 22:06:49 -04:00
Thomas Faber 42657493ef
[WIN32K] Fix uninitialized hNewMenu use in MENU_DoNextMenu.
See also: Wine's implementation.
Powered by clang-cl.
2021-10-29 22:06:46 -04:00
Hervé Poussineau cd48bc7af8 [LIVECD] Add more registry entries for vbemp/vgamp
CORE-17579
2021-10-25 21:44:45 +02:00
Katayama Hirofumi MZ 6417b2323d
[NTUSER][USER32] Workaround tracking menu on CORE-17338 (#4048)
This prevents the tracking menu from erroneously closing itself right after it was opened in some cases.
Fixes CORE-17338 which got unhidden by 0.4.15-dev-1126-g 58b0558f94
And fixes CORE-15760 which got unhidden by SVN r74972 == git 19dd22d422

Since both symptoms look very similar but the unhiding revisions did differ,
that could mean we do have some kind of race condition here.
I guess this fix is more like a workaround. I do intend to port it back nevertheless.
2021-10-23 22:29:39 +02:00
Hermès Bélusca-Maïto 5891ab2bfd
[WIN32SS:NTUSER] Make sure to hold User Global Lock before manipulating desktops. (#4053) 2021-10-22 21:44:56 +02:00
Hermès Bélusca-Maïto 6b7b0f0c7e
[WIN32SS:NTUSER] Few formatting fixes. 2021-10-22 21:44:52 +02:00
Katayama Hirofumi MZ a37d9a4e14
[IMM32] Rewrite ImmInstallIMEW (#4044)
- Add Imm32StrToUInt and Imm32UIntToStr helper functions.
- Add Imm32LoadImeVerInfo, Imm32GetRegImes, Imm32WriteRegIme, Imm32GetNextHKL, Imm32CopyFile helper functions.
- Add REG_IME structure for registered IMEs.
- Rewrite ImmInstallIMEW function.
- Improve ImmLoadLayout and Imm32LoadImeInfo functions.
CORE-11700
2021-10-21 10:28:04 +09:00
James Tabor 83f86b8fdb [User32] Fix incorrect check.
Use Lo Word instead of Intersource check.
Fix wine user32 tests.
2021-10-19 15:29:51 -05:00
James Tabor e98684ed8b [GDI32] Fix rectangle flag issues.
Fix CORE-17815. Remove dumb dumb code breakers.
2021-10-16 11:16:43 -05:00
Hervé Poussineau ea8cbbd4ca [VIDEOPRT] Correctly return failure in IRP_MJ_CREATE when HwInitialize fails
CORE-17789
2021-10-14 23:39:31 +02:00
Hervé Poussineau 807af6a4d1 [VIDEOPRT] Correctly return failure when adapter can't be found
This was wrong in both call chains (PNP case or legacy case)
HwFindAdapter returns a VP_STATUS, while we were expecting a NTSTATUS.

CORE-17789
2021-10-14 23:39:31 +02:00
Hervé Poussineau 87b74f2901 [VIDEOPRT] Correctly report legacy resources in IRP_MN_FILTER_RESOURCE_REQUIREMENTS
It was broken since first commit 25eae4b916 (r54237)

CORE-17789
2021-10-14 23:39:31 +02:00
Hervé Poussineau 951dc66c66 [VGAMP] Correctly check and report legacy resources (VGA I/O ports and memory)
As we are a non PNP driver, the call chain will be
DriverEntry -> VidePortInitialize -> VideoPortFindAdapter -> HwFindAdapter.

If legacy resources are available, we will fail VGAFindAdapter,
so DriverEntry will fail, so vgamp.sys driver won't be used.

CORE-17789
2021-10-14 23:39:30 +02:00
Hervé Poussineau 6dd94572e5 [VBEMP] Correctly report legacy resources (VGA I/O ports and memory)
CORE-17789
2021-10-14 23:39:30 +02:00
Hervé Poussineau 3379de3924 [VBEMP] Fail HwInitialize (ie IRP_MJ_CREATE) when /NOVESA switch is present
In that case, we want a simple VGA driver to drive the graphic adapter.

CORE-17789
2021-10-14 23:39:30 +02:00
James Tabor 63e7d6c29e [Win32K] Fix typo
Fix a GERRRR typo.
2021-10-14 09:59:53 -05:00
Chan Chilung 463784c5f1
[TRANSLATION] Chinese Traditional (zh-TW) translation update (#3954)
Also sync LOCALMON/UI translation with Wine.
2021-10-10 15:00:44 +03:00
Katayama Hirofumi MZ 66ef31494e
[IMM32] Implement ImmActivateLayout (#3987)
- Add IME_STATE and IME_SUBSTATE structures.
- Modify INPUTCONTEXTDX structure.
- Implement ImmActivateLayout function.
- Improve ImmDestroyContext function by using newly-defined Imm32FreeImeStates.
- Add Imm32FetchImeState, Imm32FetchImeSubState, Imm32LoadImeStateSentence, Imm32SaveImeStateSentence, and Imm32SelectLayout helper functions.
- Modify NtUserSetThreadLayoutHandles prototype.
CORE-11700
2021-10-04 07:33:15 +09:00
Katayama Hirofumi MZ 33affbfecb
[IMM32] Rewrite ImmGetImeMenuItemsA/W (#3983)
- Rewrite ImmGetImeMenuItemsA and ImmGetImeMenuItemsW functions.
- Add Imm32GetImeMenuItemsAW, Imm32IsImcAnsi, Imm32ImeMenuAnsiToWide and Imm32ImeMenuWideToAnsi helper functions.
- Make IME module's ImeGetImeMenuItems function optional.
CORE-11700
2021-10-01 03:04:00 +09:00
Katayama Hirofumi MZ 9adc538c9c
[IMM32] Rewrite ImmSetActiveContext (#3982)
- Re-implement ImmSetActiveContext function.
- Modify NtUserNotifyIMEStatus prototype.
- Improve ImmSetConversionStatus and ImmSetOpenStatus functions.
CORE-11700
2021-10-01 03:02:56 +09:00
Hervé Poussineau 92d0dd3633 [VIDEOPRT] Create and setup new registry key only for non-legacy drivers
CORE-17734
2021-09-29 22:56:35 +02:00
James Tabor b5fae844de [NtGDI] Fix brush attribute transfer. 2021-09-28 19:08:45 -05:00
James Tabor 72f115d6ed [NtGDI] Set owner after changing object type. 2021-09-27 23:49:35 -05:00
James Tabor d9f8b8b033 [NtGDI] Fix leaking of bitmaps while testing INFO DC's.
Soon to be commit test for metafiles.

ret = MaskBlt(hdc, 0, 0, 3, 4, dib_hdc, 0, 0, mask_bitmap, 0, 0, SRCCOPY);
2021-09-27 23:11:33 -05:00
James Tabor 8767aada75 [GDI32] Fix IV msvc build. 2021-09-27 19:08:43 -05:00
James Tabor be4540821a [GDI32] Fix III msvc build. 2021-09-27 18:19:49 -05:00
Hermès Bélusca-Maïto e6306db0c3
[GDI32] Fix build errors~~ 2021-09-28 00:48:24 +02:00
James Tabor d4b2c97b67 [GDI32] Fix msvc build errors. 2021-09-27 17:30:40 -05:00
James Tabor fc16259faf [GDI32] Update Wine Metafile Code
Sync/Port: Metafile code from wine.

Patches by Jacek Caban, Daniel Lehman, Zhiyi Zhang. Gabriel Ivancescu, Michael Stefaniuc, Francois Gouget, Nikolay Sivov Dmitry Timoshkov, Andrew EiKum, Piotr Caban and Alexandre Julliard.

This commit is dedicated to George Bisoc!
2021-09-27 16:18:20 -05:00
Katayama Hirofumi MZ b3382d8d24
[IMM32] Rewrite ImmLockIMC (#3975)
- Add Imm32InitContext and Imm32LockIMCEx helper functions.
- Re-implement ImmLockIMC function.
- Modify CLIENTIMC and INPUTCONTEXTDX structures.
CORE-11700
2021-09-27 09:32:24 +09:00
Hermès Bélusca-Maïto 31c4c2efe9
[USER32] GetUserObjectSecurity/SetUserObjectSecurity: Just use UserSetLastNTError() in failure path. 2021-09-26 19:04:08 +02:00
James Tabor 970344bd16 [Win32SS|GDI] Implement seldom used API and update types for local DC's.
Two working in house application require these API. Known as FolCOL and Reach.
2021-09-25 11:57:26 -05:00
Arjav Garg a602bc3550
[NTUSER] Fix UserSendKeyboardInput() KEYEVENTF_SCANCODE use case (CORE-17144) 2021-09-25 09:56:12 -04:00
Katayama Hirofumi MZ ca3fa7197d
[IMM32] Use Imm32IsImmMode and Imm32IsCiceroMode macros (#3971)
- Define Imm32IsImmMode, Imm32IsCiceroMode and Imm32Is16BitMode macros in "precomp.h".
- Improve Imm32InquireIme and Imm32CleanupContext functions.
- Add IME_SYSINFO_WINLOGON and IME_SYSINFO_WOW16 macros (from DDK) in psdk/imm.h.
- Modify CtfImeInquireExW and CtfImeSelectEx prototype.
CORE-11700
2021-09-24 22:06:29 +09:00
Joachim Henze 222acf5a3e [NTUSER] Scrollbar.c, Avoid potential out-of-bounds-accesses in co_IntSetScrollInfo() CORE-17777
This is an addendum to
0.4.15-dev-3174-g dda9c3979e CORE-17769 and
0.4.15-dev-3147-g 3bf7e3ac13 CORE-17754 CORE-17755

We have not seen this happening in real-life yet, but some code-fragments within co_IntSetScrollInfo()
e.g. line 628 if (nBar == SB_CTL) do clearly indicate that nBar can be 2 (SB_CTL).
Some lines below we definitely must not access those 4 static arrays out of bounds then via nBar as access index!

Ftr with a bit of grepping I also found some calls like NtUserSetScrollInfo(Wnd, SB_CTL, &Info, FALSE);
e.g: in win32ss/user/user32/controls/scrollbar.c so I am pretty sure nBar == 2 can happen in practice within co_IntSetScrollInfo().

I question whether any of those reads/writes to those static arrays (or the comparisons) would make any sense on index 2,
so we should aim to eliminate them altogether in the future.
2021-09-20 03:05:05 +02:00
Joachim Henze dda9c3979e [NTUSER] Scrollbar.c, improve co_IntSetScrollInfo() CORE-17769
Fixes CORE-17769 'Rapps Listview manual resize may erroneously not draw the triangles sometimes'
This could happen for both: themed and unthemed.

CORE-17769 was a regression introduced by 0.4.14-dev-1134-g 00adb1a3f9

We don't really like the added state in form of the static variables,
but the patch works good from a pure testing-perspective.

Many Thanks to the patches author: Doug Lyons
2021-09-19 22:35:37 +02:00
Hermès Bélusca-Maïto 271556e6f8
[WIN32SS] Disable by default the dumping function. Addendum to 69f90508. 2021-09-19 00:46:56 +02:00
Hermès Bélusca-Maïto 69f905081c
[WIN32SS:NTUSER] Move the keyboard layout debugging code to a separate dump function.
And fix its obvious bugs, e.g. not checking for possible NULL pointers
for the optional keyboard layout sub-tables...
2021-09-19 00:18:04 +02:00
Katayama Hirofumi MZ df6fff78bb
[IMM32] Rewrite ImmAssociateContextEx (#3961)
- Rewrite ImmAssociateContextEx function.
- Modify NtUserAssociateInputContext prototype.
CORE-11700
2021-09-16 19:29:49 +09:00
Katayama Hirofumi MZ afb6c8a129
[IMM32] Rewrite ImmEscapeA/W (#3959)
- Rewrite ImmEscapeA and ImmEscapeW functions.
- Delete useless legacy code.
CORE-11700
2021-09-16 19:27:43 +09:00
Victor Perevertkin d74eb54b06
[WIN32SS:GDI] Add a sanity assert 2021-09-14 17:58:23 +03:00
Hermès Bélusca-Maïto 9393fc320e
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
2021-09-13 03:52:22 +02:00
Doug Lyons 3bf7e3ac13
[NTUSER] Improve Themed Scrollbars by Minimizing Updates (#3953)
This fixes regressions CORE-17754 and CORE-17755 which regressed by
0.4.15-dev-3086-g 236649c626
2021-09-12 22:54:46 +02:00
Süleyman Poyraz 53221834c5
[TRANSLATION] Add and improve Turkish (tr-TR) translation (#3561)
Reviewed-by: Can Taşan <ctasan99@hotmail.com>
Reviewed-by: Ercan Ersoy <ercanersoy@ercanersoy.net>
Signed-off-by: Süleyman Poyraz <zaryob.dev@gmail.com>
2021-09-12 00:34:11 +03:00
Hermès Bélusca-Maïto 4cbc61fd02
[WIN32SS:NTUSER][USER32] NtUserProcessConnect() should return pointers in user client-space. (#3937)
- Do the kernel/server --> user/client-space pointers conversion within
  NtUserProcessConnect(), instead of having the callers of this function
  doing this job.
  This makes the behaviour Windows-compatible.

  NOTE: the gHandleEntries pointer is ReactOS-specific!

- Drop the g_ulSharedDelta global, just use instead gSharedInfo.ulSharedDelta.

- Add extra documentation aspects for NtUserProcessConnect() that are
  not yet implemented in ReactOS.
2021-09-09 16:15:12 +02:00
Hermès Bélusca-Maïto a407cb8f10
[WIN32SS:NTUSER] Update the definition of SHAREDINFO and fix the definition of FNID_LAST. (#3937) 2021-09-09 16:15:11 +02:00
James Tabor a022dc8eaf [GDI32] Fix Meta file packing recursion issues.
TextOut was looping back adding additional EMR packet to the meta file.
2021-09-06 18:37:24 -05:00
James Tabor 03516733ef [GDI32] Do not fail on path with bitmap fonts.
Patch by Dmitry Timoshkov : ExtTextOut on a path with bitmap font
selected shouldn't fail.
This just leads to empty path generated.
2021-09-06 17:53:35 -05:00
Doug Lyons 236649c626
[UXTHEME][NTUSER] Fix flashing of scrollbar when scrolling (#3868)
Based on a patch by I_Kill_Bugs.
2021-09-03 22:34:26 +03:00
Katayama Hirofumi MZ 4689c8ead8 [USER32][INCLUDE] Move GetImmFileName declaration from user32.h to user32p.h
From: win32ss/user/user32/include/user32.h
To: win32ss/user/user32/include/user32p.h

CORE-11700
2021-08-31 13:42:54 +09:00
Katayama Hirofumi MZ a8d2cd4b9d
[IMM32] Rewrite ImmGetContext (#3923)
- Add ValidateHwndNoErr and Imm32GetContextEx helper functions.
- Rewrite ImmGetContext function by using the helper functions.
CORE-11700
2021-08-24 06:50:39 +09:00
Katayama Hirofumi MZ 2ab858c125
[USER32][IMM32] Improve User32InitializeImmEntryTable (#3918)
- Improve User32InitializeImmEntryTable function and related.
- Complete win32ss/user/user32/include/immtable.h table.
- Delete a hack in user32.DllMain and apply my magical tricks. This will fix some access violations in IMM32.
- Add some stubs into IMM32.
CORE-11700
2021-08-23 16:25:21 +09:00
Katayama Hirofumi MZ 10c9aa067f
[NTUSER] Improve NtUserQueryWindow (#3915)
- Improve NtUserQueryWindow function.
- Add IMC structure.
- Modify THREADINFO structure.
CORE-11700
2021-08-21 07:31:10 +09:00
Katayama Hirofumi MZ 1d0587fc27
[IMM32] Rewrite ImmProcessKey (#3917)
- Rewrite ImmProcessKey function.
- Modify win32ss/include/imetable.h.
- Modify ImmProcessKey prototype.
CORE-1170
2021-08-21 07:22:43 +09:00
Katayama Hirofumi MZ c59c185d1c
[INCLUDE] Move WM_IME_SYSTEM from ntuser.h to undocuser.h (#3920)
CORE-11700
2021-08-19 08:18:20 +09:00
Katayama Hirofumi MZ 1f792413f0 [NTUSER][INCLUDE] s/TransMsg[1]/TransMsg[ANYSIZE_ARRAY]/
CORE-11700
2021-08-18 19:59:35 +09:00