Commit graph

810 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 8f719cb97e
[NTUSER][IMM32] Create the default IME window! (retry) (#4463)
The default IME window has to be created for each top-level window in specific condition. It is needed for implementing Japanese input.
- Add IntFocusSetInputContext helper function.
- Call IntFocusSetInputContext after sending WM_KILLFOCUS message.
- Add IntWantImeWindow, co_IntCreateDefaultImeWindow, and IntDestroyOwnedWindows helper functions.
- Create the default IME window (spwndDefaultIme) for the specified window at IntCreateWindow.
- Fix Imm32InternalLockIMC function.
CORE-11700
2022-04-23 07:11:48 +09:00
Katayama Hirofumi MZ 4bcf23d1de
[NTUSER] Destroy the default IME window (#4462)
- Add IntFindNonImeRelatedWndOfSameThread, IntImeCanDestroyDefIMEforChild, and IntImeCanDestroyDefIME helper functions.
- Do assignment unlock spwndDefaultIme at co_UserFreeWindow.
- Destroy the default IME window of the specified window if necessary at co_UserDestroyWindow.
CORE-11700
2022-04-20 16:10:06 +09:00
Katayama Hirofumi MZ 291a94cd6f
[NTUSER] Implement NtUserSetImeOwnerWindow (#4460)
- Add IntImeSetFutureOwner, IntGetLastTopMostWindowNoIME, IntImeSetTopMost, and IntImeCheckTopmost helper functions.
- Implement NtUserSetImeOwnerWindow function.
CORE-11700
2022-04-19 19:03:12 +09:00
Katayama Hirofumi MZ 5df5ef2bdf
[NTUSER] Do assignment lock at NtUserSetThreadLayoutHandles (#4459)
- Use UserAssignmentLock in NtUserSetThreadLayoutHandles.
- Add Win: comments to many functions.
- Rename glcid as glcidSystem.
CORE-11700
2022-04-19 08:41:13 +09:00
Katayama Hirofumi MZ c35488ec70
[NTUSER][USER32] Implement ImeWnd_OnImeNotify (#4457)
- Add code to ImeWnd_OnImeNotify function.
- Insert ASSERT(pimeui->spwnd != NULL); to some functions.
- Renaming: s/THREADSTATE_UNKNOWN17/THREADSTATE_CHECKCONIME/.
- Improve ImeWnd_OnImeSetContext function.
CORE-11700
2022-04-19 07:48:16 +09:00
Katayama Hirofumi MZ 7e13883723
[NTUSER] Do assignment lock pti->spDefaultImc (#4456)
According to JIRA user simonelombardo, there was crash in exiting a thread.
- Add UserAssignmentLock, and UserAssignmentUnlock helper functions.
- Lock and unlock pti->spDefaultImc by using those helper functions.
CORE-18044
2022-04-18 08:23:18 +09:00
Katayama Hirofumi MZ 567b0700fe
[NTUSER] Add 'Win:' comments to some functions (#4453) 2022-04-17 06:53:37 +09:00
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
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 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 ded971c425 [WIN32SS] Remove useless parameter dwFlags in EngpFindGraphicsDevice() 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
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
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
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 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
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
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
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
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
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
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 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
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 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
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
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
Katayama Hirofumi MZ 3d78601f39
[WIN32SS][NTUSER] Implement NtUserDestroyInputContext (#4063)
CORE-11700
2021-11-01 15:20:42 +09: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
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
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
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 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
Hermès Bélusca-Maïto 31c4c2efe9
[USER32] GetUserObjectSecurity/SetUserObjectSecurity: Just use UserSetLastNTError() in failure path. 2021-09-26 19:04:08 +02:00
Arjav Garg a602bc3550
[NTUSER] Fix UserSendKeyboardInput() KEYEVENTF_SCANCODE use case (CORE-17144) 2021-09-25 09:56:12 -04: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
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
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 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 f4bc74edc3
[IMM32] ImmGenerateMessage and ImmTranslateMessage (#3914)
- Rewrite `ImmGenerateMessage` and `ImmTranslateMessage` functions.
- Rename `INPUTCONTEXTDX.bHasVKey` as `bNeedsTrans`.
- Move `TRANSMSG` structure into `ntuser.h`.
- Add `TRANSMSGLIST` structure into `ntuser.h`.
- Add `UNDETERMINESTRUCT` structure to `ddk/imm.h`.
- Modify `NtUserGetAppImeLevel` prototype.
CORE-11700
2021-08-18 08:42:12 +09:00
Jérôme Gardou c4801ab696 [WIN32K] Do not release twice the lock on error path 2021-08-06 15:18:21 +02:00
Jérôme Gardou 0bc00267df [WIN32K] Init User part after GDI one.
But Initialize user lock first thing to avoid hitting newly introduced ASSERTS

This partly reverts commit 515d83a883.
2021-08-06 10:15:02 +02:00
Katayama Hirofumi MZ 692a30a84a
[IMM32] ImmCreateContext, ImmDestroyContext, DllMain etc. (#3867)
- Rewrite ImmCreateContext, ImmDestroyContext, and DllMain functions.
- Add g_hImm32Inst, g_bClientRegd, and g_SharedInfo global variables. Delete g_dwImm32Flags (that was g_psi->dwSRVIFlags).
- Implement ImmLoadIME and ImmRegisterClient functions.
- Modify CLIENTIMC and IMEDPI structures. Move CLIENTIMC definition into ntuser.h.
- Add file win32ss/include/imetable.h.
- Rename SRVINFO_METRICS macro as SRVINFO_CICERO_ENABLED.
CORE-11700
2021-08-04 09:41:59 +09:00
Jérôme Gardou bd6fb80867 [WIN32K:NTUSER] In debug builds, enable free & tail checking when creating heaps
Actually catches bugs
2021-08-03 23:13:19 +02:00
Jérôme Gardou b783b16cef [WIN32K:USER] Fix potential use after free when painting child windows 2021-08-03 23:13:19 +02:00
Jérôme Gardou d958dc9bc2 [WIN32K:NTUSER] Assert global user lock is held exclusively when using global & desktop heaps
They're explicitly not serialized because we count on this.
2021-08-03 23:13:19 +02:00
Jérôme Gardou 8c098ee8d2 [WIN32K:NTUSER] Make sure to hold User Global Lock before unmapping desktop heap 2021-08-03 23:13:19 +02:00
Jérôme Gardou 6ec0420dc6 [WIN32K:NTUSER] Allocate & free timers under global user lock 2021-08-03 23:13:19 +02:00
Jérôme Gardou 515d83a883 [WIN32K] On init, start by initializing NtUser stuff
Allocate gpsi (Global Server Info) after initializing & grabbing Userlock
2021-08-03 23:13:19 +02:00
Katayama Hirofumi MZ 89cb8a38b3
[IMM32] Rewrite ImmEnumInputContext (#3859)
- Rewrite ImmEnumInputContext function.
- Modify NtUserBuildHimcList.
CORE-11700
2021-07-31 15:45:07 +09:00
Timo Kreuzer 204626f793 [WIN32K] Fix uninitialized variable 2021-07-27 14:44:14 +02:00
Katayama Hirofumi MZ ecb0c0963d
[IMM32] Imm(Lock|Unlock)ImeDpi and ImmSetOpenStatus (#3830)
- Add IMEDPI structure to ntuser.h.
- Implement ImmLockImeDpi/ImmUnlockImeDpi functions.
- Rewrite ImmSetOpenStatus function.
- Modify some NTUSER function prototypes.
- Modify imm32.spec.
CORE-11700
2021-07-25 11:57:57 +09:00
Timo Kreuzer 5d8e834897 [REACTOS] Fix a number of MSVC warnings 2021-07-23 22:03:48 +02:00
Timo Kreuzer 77e891b8ab [WIN32K] Check if a graphics device already exists before trying to add it
This avoids DPRINTs alleging a failure to open a device.
Also improve another DPRINT.
2021-07-15 08:32:46 +02:00
Katayama Hirofumi MZ 92393a7517
[IMM32] Add some candidate handlings (#3799)
- Implement ImmGetCandidateListA and ImmGetCandidateListW, by using newly added ImmGetCandidateListAW function.
- Implement ImmLockClientImc and ImmUnlockClientImc functions.
- Modify imm32.spec.
- Remove #ifdef's.
CORE-11700
2021-07-11 09:48:15 +09:00
Hervé Poussineau 0f6b9664cd [WIN32K] HACK: create a DC on all display devices and display wallpaper 2021-07-10 16:27:44 +02:00
Hervé Poussineau 6739fb1bc3 [WIN32K] Move detection of available display devices a new fonction EngpUpdateGraphicsDeviceList
- rewrite InitVideo() to call this new function
- also call it at the start of UserEnumDisplayDevices, to detect new potential devices
2021-07-10 16:27:44 +02:00
Jérôme Gardou 813d9cd2cc [WIN32K:NTUSER] Do not pass NULL keyboard layout to IntToUnicodeEx
There's an ASSERT on that
2021-06-29 11:49:20 +02:00
Katayama Hirofumi MZ 59d4c11203
[WIN32SS][NTUSER] ShowWindow.SW_MINIMIZE should show window (#3700)
- user32!ShowWindow.SW_MINIMIZE should show the window.
- Fix the return value of ShowWindow function on invalid parameter.
CORE-15669
2021-06-01 11:11:23 +09:00
Katayama Hirofumi MZ 32b0cf6fc6
[WIN32SS][NTUSER] Improve HSHELL_WINDOWCREATED condition (#3697)
Modify the condition of generating HSHELL_WINDOWCREATED, especially on WS_CHILD window style. CORE-15669
2021-05-31 13:08:06 +09:00
Timo Kreuzer d07203ecb7 [WIN32K][USER32] Change mechanism for storing dialog info pointer
DLGWINDOWEXTRA is 30 (both on win32 and win64). This has storage for the following entries: DWLP_MSGRESULT (0), DWLP_DLGPROC (8), DWLP_USER (16)
We used to store the dialog info pointer using SetWindowLongPtr (DWLP_ROS_DIALOGINFO == DWLP_USER+sizeof(ULONG_PTR) == 24), which was fine on win32, but failed on win64, since there wasn't enough space left (24 + 8 = 32 > 30).
Rewrite the way the DLGINFO pointer is stored, by adding an additional field to the WND structure and set it using NtUserxSetDialogPointer (which is what it is for).
Also fix too small cbWndExtra for the button class.
2021-05-28 08:26:36 +02:00
Jérôme Gardou 3adf450867 [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build
Put data into PAGEDATA or INITDATA sections
Keep section declaration for prototypes

CORE-17540
2021-05-12 11:04:29 +02:00
Hermès Bélusca-Maïto f9aca9f7d2
[CONSRV] wcwidth.c: Fix out-of-range comparisons Clang warnings for wchar_t's, that are only 2 bytes long on NT. (#3619)
CORE-17545

win32ss/user/winsrv/consrv/frontends/wcwidth.c:203:30: warning: result of comparison of constant 262141 with expression of type 'wchar_t' (aka 'unsigned short') is always true [-Wtautological-constant-out-of-range-compare]
      (ucs >= 0x30000 && ucs <= 0x3fffd)));
                         ~~~ ^  ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:203:12: warning: result of comparison of constant 196608 with expression of type 'wchar_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
      (ucs >= 0x30000 && ucs <= 0x3fffd)));
       ~~~ ^  ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:202:30: warning: result of comparison of constant 196605 with expression of type 'wchar_t' (aka 'unsigned short') is always true [-Wtautological-constant-out-of-range-compare]
      (ucs >= 0x20000 && ucs <= 0x2fffd) ||
                         ~~~ ^  ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:202:12: warning: result of comparison of constant 131072 with expression of type 'wchar_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
      (ucs >= 0x20000 && ucs <= 0x2fffd) ||
       ~~~ ^  ~~~~~~~
2021-05-05 17:24:13 +02:00
Hermès Bélusca-Maïto 9a93d2fe3a
[CONSRV] Fix uninitialized variables warnings detected by Clang. (#3619)
CORE-17545

Fix 3 warnings:

win32ss/user/winsrv/consrv/alias.c:648:16: warning: variable 'Status' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
        while (CurEntry)
               ^~~~~~~~
win32ss/user/winsrv/consrv/alias.c:693:12: note: uninitialized use occurs here
    return Status;
           ^~~~~~

win32ss/user/winsrv/consrv/alias.c:715:9: warning: variable 'Status' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    if (Header)
        ^~~~~~
win32ss/user/winsrv/consrv/alias.c:727:12: note: uninitialized use occurs here
    return Status;
           ^~~~~~

win32ss/user/winsrv/consrv/alias.c:771:16: warning: variable 'Status' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
        while (RootHeader)
               ^~~~~~~~~~
win32ss/user/winsrv/consrv/alias.c:807:12: note: uninitialized use occurs here
    return Status;
2021-05-05 17:24:12 +02:00
Jérôme Gardou e470b58376 [REACTOS] Explicitly link against pseh & include pseh headers in a few places 2021-04-28 13:10:23 +02:00
George Bișoc ffea5152e6
[WIN32SS][NTUSER] Fix an integer underflow within scrollbar info setting
Thanks goes to I_Kill_Bugs for the patch (and partly to Kyle Katarn for the PR) and Hermes for tweaking the patch code. Had to make a commit myself as the PR author's account is deleted.

Signed-off by: I_Kill_Bugs (original patch author)
Signed-off by: Kyle Katarn <contact@kcsoftwares.com>
Signed-off by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2021-04-25 15:56:39 +02:00
Tibor Lajos Füzi ea04edce2d [TRANSLATION] Add/update Hungarian translation for solitaire, spider solitaire, rapps, usetup, cpl/timedate, shell32, user32 2021-04-14 16:16:24 +02:00
Chan Chilung 6a31fe6ca7
[TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468)
- Add / improve Chinese Traditional Translations for INFs.

- Name changing (removed Aobi in my name)

Add Chinese Traditional translation for:
- cmdutils/at
- cmdutils/comp
- hotplug.cpl
- rosapps' sysutils/ctm

Chinese Traditional (zh-TW) translation update for:
- cmdutils/find
- cmdutils/help
- cmdutils/label
- cmdutils/whoami
- mspaint
- shutdown
- taskmgr
- diskpart
- format
- appwiz.cpl
- input.cpl
- powercfg.cpl
- shimgvw
- user32
2021-03-09 16:51:37 +01:00
George Bișoc b00ecdcab9
Replace my E-mail with the ReactOS org one (#3475)
From now on for ReactOS related contributions only the organization e-mail shall be used and also reverse the order of my real full name.
2021-02-22 18:26:55 +03:00
Serge Gautherie cb5d610a73
[CONSRV] SetConWndConsoleLeaderCID(): Check must be before dereferencing (#3451)
Addendum to f12e601.
2021-02-10 18:55:19 +01:00
Jérôme Gardou f12e6016b6 [CONSRV] Set 0 as a console leader PID/TID when unsetting it.
Instead of whatever is behind the NULL pointer.
2021-02-10 17:48:30 +01:00
Victor Perevertkin 46ca069e42
[XDK] Remove UNREFERENCE_LOCAL_VARIABLE macro
Change UNREFERENCED_PARAMETER to (VOID)P to support const parameters
2021-01-19 00:15:02 +03:00
Jérôme Gardou b96e88894a [CMAKE] Turn import libs into regular C static libs
Embed msvcrtex into libmsvcrt

Idea taken from Thomas Faber
2020-12-28 12:13:30 +01:00
Hermès Bélusca-Maïto 89f36bcfc8
[CONSRV] Less hardcoded magic values. 2020-12-27 00:52:01 +01:00
Dmitry Borisov bc90cbbb88
[WIN32K:NTUSER] Fix gradient caption bars with low color depth (#3338)
This fixes a problem when the window title bar is dithered down
to the 16- or 256-color palette. See also commit 0705f30.
2020-12-20 23:12:30 +03:00
Joachim Henze 449a341786 [WIN32SS] Trim EOL white-space
Addendum to 0.4.15-dev-1457-g 870aa1254f
2020-12-19 17:51:37 +01:00
Joachim Henze 870aa1254f [WIN32SS] Fix BSOD 0x1E nullptr deref via Git-bash CORE-16586
Thanks to the patches author Doug Lyons!
2020-12-19 17:47:33 +01:00
Jérôme Gardou 484e959c29 [USER32] Properly save EBX in the wndproc wrapper 2020-12-09 10:00:35 +01:00
Victor Perevertkin 5c7ce4475e
[REACTOS] Cleanup INIT and some PAGE section allocations
- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore
2020-11-02 21:45:31 +03:00
Doug Lyons 8081ba9332
[WIN32SS] Repaint the whole window frame on some style bits set (#3199)
This fixes the ReactOS Calculator buttons disappearing in CORE-16827
2020-10-24 22:35:45 +03:00
Katayama Hirofumi MZ 58b0558f94
[NTUSER] Fix Shell Hook HSHELL_WINDOWCREATED (#3294)
Fix Shell Hook and reduce failures of shell32_apitest ShellHook testcase. Fix the condition of notifying shell hook HSHELL_WINDOWCREATED in ntuser/winpos.c. CORE-17330
2020-10-13 16:37:52 +09:00
Katayama Hirofumi MZ f341e60fbe [USER32] Mute 'Imm Api Table Init 2' spam
CORE-11700
2020-09-26 11:13:43 +09:00
Katayama Hirofumi MZ 33fe4333f4
[USER32] Load IMM table (#3215)
Implement the IMM function table in module user32.dll. CORE-11700
File immtable.h is located at win32ss/user/user32/include, that is a list of the DEFINE_IMM_ENTRY macro calls.
2020-09-23 21:42:54 +09:00
Serge Gautherie 889b077b23
[REACTOS] *.spec: Fix some function/parameter types (#3154) 2020-09-20 19:21:11 +02:00
Katayama Hirofumi MZ ab115e30fe
[IMM32][INCLUDE] Add immtable.h and modify imm32.spec (#3207)
- Add immtable.h header into win32ss/user/user32/misc/.
- Modify imm32.spec file.
CORE-11700
2020-09-19 22:47:40 +09:00
Serge Gautherie 345ad55319
[BROWSEUI][USER32] Explicitly use MAKEINTRESOURCEW() for consistency (#3192) 2020-09-15 14:56:51 +03:00
Serge Gautherie a04831677e
[PROGMAN][CRT][USER32] Do not use LoadLibraryEx() NT6+ flags (#3152)
CORE-12004
2020-09-13 23:42:09 +02:00
Kyle Katarn f07ace6aa2
[RAPPS][CONSRV] French translation update (#3160)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-13 23:12:52 +02:00
Katayama Hirofumi MZ 8396cf8696 [CONSRV] Improve Japanese (ja-JP) translation 2020-09-13 16:50:15 +09:00
chirsz cd2eaf1e51
[CONSRV] Improve zh-CN translation (#3157)
The new word is more in line with PRC people's usage habits, and it
is actually used in the Simplified Chinese translation of Windows.
2020-09-12 18:23:05 +02:00
Kyle Katarn 9f428f5522
[NTUSER] Demote ERR to TRACE, also some minor corrections (#3132) 2020-09-05 17:59:10 +03:00
Katayama Hirofumi MZ dce62240f1
[NTUSER] Improve SPI_SETWORKAREA setting (#3061)
CORE-12018, CORE-7237
2020-08-20 11:31:57 +09:00
Katayama Hirofumi MZ 81f28d454a
[NTUSER] Set ERROR_INVALID_WINDOW_HANDLE when PostMessage failed (#3059)
Set the last error code ERROR_INVALID_WINDOW_HANDLE when user32!PostMessage failed with destroyed window.
CORE-12124
2020-08-18 05:32:44 +09:00
Aobi Chan CL 860b45aca1
[USERINIT][WINLOGON][USER32][USERSRV] Update Traditional Chinese (Taiwan) translation (#3018) 2020-08-16 15:13:55 +03:00
Omer Itzic S a6946307fc
[USERSRV] Update Hebrew translation (#3010)
Co-authored-by: Baruch Rutman <peterooch@gmail.com>
2020-08-15 22:57:07 +03:00
Katayama Hirofumi MZ 4b038ec8b7
[IMM32][NTUSER] Add ImmGetImeInfoEx (#3035)
- Add the definition of imm32!ImmGetImeInfoEx function.
- Add IMEINFOEXCLASS and IS_IME_HKL into "ntuser.h".
- Modify NtUserGetImeInfoEx function prototype.
CORE-11700
2020-08-12 06:03:29 +09:00
Katayama Hirofumi MZ 047da7e632
[NTUSER] Add more QUERY_WINDOW_* values (#3034)
Add QUERY_WINDOW_* constant values for NtUserQueryWindow funciton. CORE-11700
2020-08-12 06:01:22 +09:00
Katayama Hirofumi MZ ec9d277d59
[IMM32][NTUSER] Implement ImmGetHotKey (#3025)
CORE-11700
- Implement imm32!ImmGetHotKey function.
- Modify NtUserGetImeHotKey function.
- Add LPHKL typedef into <imm.h> header.
2020-08-09 22:41:11 +09:00
Nguyen Trung Khanh ff50b0db2e
[NTUSER] Fix stack memory disclosure in NtUserBuildPropList (#3023)
Fix structure alignment cause to stack memory disclosure in NtUserBuildPropList.
2020-08-08 14:05:22 +09:00
Jose Carlos Jesus 62e52c7237
[USER32][NTUSER] Fix wrong return from LB_GETLISTBOXINFO (#2168)
And is now consistent with comctl32 and Wine too...
2020-07-04 15:11:10 +02:00
Nguyen Trung Khanh a279b1d2c6
[WIN32K:NTUSER] Zero allocated memory in IntCbAllocateMemory.
This avoids disclosing pool contents to user mode when not all members
of the respective structure are initialized or when there is padding.

In co_IntCallWindowProc, also zero the stack buffer since this can
be passed to user mode as well, and contains padding.
2020-06-24 09:15:27 +02:00
James Tabor f6d2b34ad0 [NtUser] Fix MSVC_x64 Build
Attempt to fix.
2020-06-18 11:55:13 -05:00
James Tabor 06e01c8968 [NtUser] Fix Crash in Win32k
Use strict thread and desktop verifying. See CORE-15092 and CORE-17133.
2020-06-18 11:06:31 -05:00
Serge Gautherie 95e5877027
[USER32] MDIClientWndProc_common(): Properly sync to old Wine (#2843)
No impact.

Missed part of
fb6304119a

Detected by Cppcheck: identicalInnerCondition.
Addendum to 303ece2421 (r72520).
2020-06-01 12:14:38 +03:00
Serge Gautherie 938df97b54
[WIN32K:NTUSER] NC_IconForWindow(): Remove redundant if() (#2842)
No impact.

Detected by Cppcheck: identicalInnerCondition.
Addendum to 98060c28c8 (r60622).
2020-05-26 20:25:39 +02:00
Julen Urizar Compains 546862babc
[TRANSLATION] Update Spanish, and add Basque translation (#2667)
Add/update translation for:
charmap_new, logoff, mspaint, notepad, usetup, welcome,
hotplug.cpl, sysdm.cpl, aclui.dll, comctl32.dll, comdlg32.dll,
hhctrl.ocx, kernel32.dll, msi.dll, oledlg.dll, shell32.dll,
tapiui.dll, themeui.dll, wininet.dll, winmm.dll, wldap32.dll,
winsrv.dll.
2020-05-17 18:46:36 +02:00
Katayama Hirofumi MZ 97ccef7761
[WIN32SS] Fix DrawTextExWorker extent for Spotify (#2759)
CORE-16747
2020-05-11 18:32:47 +09:00
Katayama Hirofumi MZ 413d722628
Revert "Revert "[COMCTL32][USER32] Fix radio button regression (#2146)" (#2753)" (#2758)
This reverts commit 66b0a48a75.
2020-05-09 15:32:15 +09:00
Katayama Hirofumi MZ 66b0a48a75
Revert "[COMCTL32][USER32] Fix radio button regression (#2146)" (#2753)
This reverts commit 2d4d3f5fce.

Reverts #2146. I think #2135 (e329e83) and #2146 (2d4d3f5) are my mistakes.
CORE-16552, CORE-16747
2020-05-09 11:30:11 +09:00
Jose Carlos Jesus ad591d0269 [USER32] Fixed issue with thumb scrolling on IDC_PICKICON_LIST 2020-04-30 18:58:20 +02:00
Jose Carlos Jesus d0a6727637 [USER32] Fixed scrolling by mouse wheel issue 2020-04-30 18:58:20 +02:00
Jose Carlos Jesus a4483d79da [USER32] Fixed scrolling issue in Change Icon dialog. CORE-16163 2020-04-30 18:58:20 +02:00
Mark Jansen dd8f30f879
[WIN32K] Allocate a buffer for a classname that is too long 2020-04-27 12:54:10 +02:00
Hermès Bélusca-Maïto 73064a7602
[WIN32SS] Fix formatting only. 2020-04-26 19:32:21 +02:00
Serge Gautherie c2dbc18660 [USER32] EDIT_WM_KillFocus(): Restore Wine code, #ifdef'ed out
Use '#ifdef __REACTOS__' for WINESYNC'ed code.

Partially reverts 71ab0b5d4c.
CORE-10266
2020-04-26 17:48:41 +02:00
Joachim Henze 87f6c82d85 [WIN32SS] CORE-16738 Comment an assert
It popped up 2-3 times for me during several
months of ros usage and I could continue without
noticing any side effects.
Giannis who once added it, was 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.
2020-04-21 23:26:47 +02:00
James Tabor b9d6c5869d [Win32SS] Fix Send and Post Parameters for WM_DEVICECHANGE
For CORE-16492. See CORE-7447.

See 43197e6641
2020-04-19 18:40:59 -05:00
Victor Perevertkin 7e069ccdb2
[CMAKE] Replace custom functions to built-in ones
add_target_compile_definitions -> target_compile_definitions
add_target_compile_flags -> target_compile_options
add_target_include_directories -> target_include_directories
2020-04-16 15:59:38 +03:00
Hermès Bélusca-Maïto c05df38e86
[CONSRV] Move process-initialization-specific functions from handle.c into console.c .
- Move ConSrvInitHandlesTable() & rename it ConSrvInitProcessHandles()
  since its purpose is to initialize the standard input, output and
  error handles for a console process.

- Move ConSrvAllocateConsole(), ConSrvInheritConsole() and
  ConSrvRemoveConsole().
2020-04-14 01:19:48 +02:00
Hermès Bélusca-Maïto 2b64d45377
Fix build. 2020-04-13 18:13:42 +02:00
Hermès Bélusca-Maïto 83c238e490
[CONSRV] Convenience fixes.
- Simplify screen-buffers initialization.
- Get rid of this CONSOLE_SCREEN_BUFFER_VTBL virtual table.
- Move ConsoleInput to a proper header.
2020-04-13 16:22:53 +02:00
Hermès Bélusca-Maïto 9261110760
[CONSRV] Introduce a set of macros CON_API / CON_API_NOCONSOLE for wrapping around the repetitive prologue/epilogue of every console CSR API entrypoint.
All the per-API message structure unpacking and console validation done
with ConSrvGetConsole() is now automatically generated using the macros,
so that the actual implementation of each API can be done independently
of how the console object is obtained.

This could also allow reusing these API implementations with a different
mechanism for obtaining the console without changing anything in them.
2020-04-12 16:09:36 +02:00
James Tabor 7772f97241 [User32] Return Default Window Procedure for WM_DEVICECHANGE
See CORE-16492.
2020-04-11 17:58:38 -05:00
James Tabor 1e0bb66452 [User32] Implement Device Event Message handler
Need a way to send WM_DEVICECHANGE from the Service manager application.
Next step is to process it in the Client/Server Run-time Subsystem.
See CORE-16492.
2020-04-11 17:41:26 -05:00
Hermès Bélusca-Maïto 75d0346c54
[CONSRV] Finally fix CONSOLE vs. CONSRV_CONSOLE/WINSRV_CONSOLE stuff. CORE-9496
What remains to be cleared up are the ugly casts.
2020-04-11 16:27:09 +02:00
Hermès Bélusca-Maïto a3ea0a39f1
[WIN32SS] Get rid of "consrv_new".
Any new features/architectural changes to the console will either be
done in separate branches, or incrementally in master within the
existing console module.
2020-04-11 15:37:27 +02:00
Mas Ahmad Muhammad b8dd046ee4
[TRANSLATION] Add and update Indonesian translations (#2506)
- CMDUTILS: attrib, label (update translation)
- USETUP (add translation)
- HOTPLUG (add translation)
- CONSRV  (update translation)
- USERSRV (update translation)
- USER32  (update translation)
- ACLUI  (update translation)
- LICCPA  (update translation)
- SUBST  (update translation)
- REGSVR32  (update translation)
- REGEDIT-CLB  (update translation)
- ACPPAGE  (update translation)
- TIMEDATE  (update translation)
- SOLITAIRE  (update translation)
- FDEBUG  (update translation)
- SYSSETUP (update translation)
2020-04-09 18:49:45 +02:00
Julen Urizar Compains f7cab5a1d4
[TRANSLATION] Multiple minor fixes and addings. (#2516)
- Applications: eventvwr, fltmgr, servman.
- rosapps: arping, CTM, fontsub, fraginator, imagesoft, systeminfo, vcdcontroltool, vgafontedit.
- CPLs: desk.cpl.
- ReactOS Setup GUI app.
- Screensavers: butterflies, maze, Starfield.
- System: NTVDM, printing/monitors/localmon; the freeze dialog in user32, the error strings in usersrv.
2020-04-09 18:13:46 +02:00
James Tabor ee3ee2a65f [User32] Fix Dialog Hang
Patch by JIRA contributor I_Kill_Bugs. See CORE-5078.

Also: https://bugs.winehq.org/show_bug.cgi?id=48749
2020-04-08 14:49:38 -05:00
James Tabor acf135d16d [Win32SS] Fix Mask for Draw Frame States
Fixes drawing of caption bar buttons.

See CORE-8808.
2020-04-05 21:11:44 -05:00
James Tabor 568b6d0558 [NTUser] Fix Strings and Format to Hooks
Allocate heap instead of data segment to be used for callbacks on user side.
Move and correct initial hook call out setup. Use it in more than one hook call.

This fixes issues with strings out of alignment and use of kernel pointers.

See CORE-13907 and CORE-16769. KsStudio still needs retested.

Small wow update.
2020-04-03 03:58:29 -05:00
jimtabor 915a5764a9 [Win32SS] Form Sanity to Hook Callbacks
Fix WH_CALLWNDPROC/RET data to user hook calls. See CORE-13019 and CORE-13907.
2020-03-28 14:18:14 -05:00
jimtabor d8add40e89 [User32] Fix null return.
See CORE-16769.
2020-03-28 14:03:15 -05:00
Timo Kreuzer 4860aa645c [WINSRV] Use DIB section for frame buffer bitmap 2020-03-22 12:05:05 +01:00
Katayama Hirofumi MZ 8c5308b5e8
[USER32] Relax conditions for creating MDI windows (#2454)
The creation conditions of MDI window was too strict. CORE-15633
2020-03-20 07:38:33 +09:00
Joachim Henze 8bb9434d3e [WIN32SS] Fix regression CORE-16721
"Scrolling by pressing the scrollbar arrows does not draw the arrows as pressed"
Fixed by a patch of JIRA-user 'I_kill_bugs'. Thank you very much!

The regression was introduced by 0.4.11-dev-586-g
929a2c6637
(which itself aimed to fix CORE-13986,
but not CORE-13918 as erroneously stated in commit comment)

I intend to port this back into 0.4.13-RC later.
2020-03-12 22:55:04 +01:00
Hermès Bélusca-Maïto b596a2cc31
[USER32] Fix crash in Edit control. CORE-16727
The #ifdef prevents setting the variable, es, to NULL, which lead to an illegal access.
This didn't match dll/comctl32/edit.c .

Patch by 'I_Kill_Bugs' contributor.
2020-03-06 20:02:03 +01:00
JoachimHenze 848d7ec633
[NTUSER] Fix ShellHook notifications when creating/activating windows (#2396) 2020-03-05 15:39:23 +01:00
Joachim Henze 00adb1a3f9 [WIN32SS] Improve Drawing Scrollbars
A very nice patch of JIRA user "I_kill_Bugs". Many many Thanks!

It addresses:
- CORE-14755 fixed, flashing scrollbar triangles (we know 131 affected apps just from rapps!)
- CORE-13931 fixed, FamiTracker invisible about-dlg
- CORE-14685 improves a bit, but is not entirely fixed
- CORE-11561 improves a bit, but is not entirely fixed
- The patch avoids unnecessary redraws, speeds up GUI interaction and NSIS install times

Jim Tabor had no complains about it, I just did some white-space-tweaks on EOL and indentation.

FTR A testbot run (not on master but on 0.4.13-RC-48-g818e5bc)
https://reactos.org/testman/compare.php?ids=71645,71666 VBox LGTM
https://reactos.org/testman/compare.php?ids=71646,71667 KVM LGTM

I felt tempted to port back, but decided to play safe and commit to master just.
2020-03-04 02:12:06 +01:00
Hermès Bélusca-Maïto e8df1a38bd
[CONSRV] Fix a corruption of the CONSRV memory when converting read input events back to ANSI.
This fixes a 6-year old copy-paste bug introduced by commit b47d51c6 (r64004).
2020-03-02 01:08:41 +01:00
Hermès Bélusca-Maïto 7babd93107
[CONSRV] Some code simplification and tidy up. 2020-03-02 01:08:41 +01:00
Hermès Bélusca-Maïto 31c13e89fe
[CONSRV] Use NtClearEvent() and NtClose() instead of the Win32 functions. 2020-03-02 01:08:40 +01:00
Hermès Bélusca-Maïto e624be1eb2
[CONSRV] Tidy up lineinput.c by moving the History* helper prototypes to a suitable header file. 2020-03-02 01:08:39 +01:00
Hermès Bélusca-Maïto 19596768cb
[CONSRV] Support history resizing from console settings and from SetConsoleHistoryInfo() server implementation.
In addition, honour the maximum number of history buffers allowed when
creating new ones.

Some implementation information has been obtained from
https://github.com/microsoft/terminal
(under MIT License).
2020-03-02 01:08:35 +01:00
Hermès Bélusca-Maïto 1d3fb3e370
[CONSRV] Fix setting the default screenbuffer and console view sizes when creating a new screenbuffer.
For more information, see:
https://docs.microsoft.com/en-us/windows/console/createconsolescreenbuffer#remarks
2020-02-23 22:43:02 +01:00
Joachim Henze 820dbfccd0 [NTUSER] Fix regression CORE-11828
Fixes symptom "mouse pointer vanishes when closing
applications via x in title-bar"

The bug in WIN32SS was unhidden by SVN r65496 == git
5c1a8109c8
, when we introduced explorer_new. The old explorer
had a workaround built within.

Many thanks to patches author James Tabor.
I intend to backport into 0.4.13RC as well.
2020-02-23 13:56:05 +01:00
Hermès Bélusca-Maïto 90d795b0bf
[CONSRV] Keep a count of input events in the console queue + code simplifications.
- Update the documentation of members of CONSOLE_INPUT_BUFFER.
- Simplify ConDrvGetConsoleNumberOfInputEvents().
- Simplify ConDrvFlushConsoleInputBuffer().
- Use also GetConsoleInputBufferMode() more often.
2020-02-22 23:27:42 +01:00
Hermès Bélusca-Maïto 570eba2a52
[KERNEL32][CONSRV] Use more often the internal ConioRectHeight/Width() and ConioIsRectEmpty() macros. 2020-02-22 21:15:58 +01:00
Hermès Bélusca-Maïto 05053b6f18
[CONSRV] ConDrvScrollConsoleScreenBuffer() fixes. (#2278)
- Reimplement ConDrvScrollConsoleScreenBuffer() with separate copy and
  fill helper functions and calculate rectangles in such a way as to
  never use X-Y coordinates pointing outside of the screen buffer.

- Add X-Y coordinates assertions in ConioCoordToPointer().
2020-02-22 19:50:18 +01:00
Hermès Bélusca-Maïto d46e054368
[CONSRV] Miscellaneous console fixes for CJK support and screenbuffer iteration. (#2278)
+ popup.c!DrawBox(): Factor out setting the attribute value.
2020-02-22 19:50:17 +01:00
Joachim Henze feb7df42b4 [WIN32SS] Fix a typo in dbg print 2020-02-22 19:40:52 +01:00
Katayama Hirofumi MZ 9199c90328
[WIN32SS][NTUSER] Fix ScrollWindowEx SW_SCROLLCHILDREN (#2327)
Based on the patch of I_Kill_Bugs of JIRA user. CORE-16687, CORE-12114
2020-02-11 20:59:14 +09:00
Hermès Bélusca-Maïto 53061a4b69
[CONSRV] Additions for the GUI frontend.
- Fix the text-copy code to handle fullwidth characters.
- Move the caret painting code to its own function.
2020-02-09 00:39:16 +01:00
Hermès Bélusca-Maïto 0d500b642b
[CONSRV] Simplify parts of code in the line-input module. 2020-02-09 00:38:32 +01:00
Hermès Bélusca-Maïto fe3d655bc0
[CONSRV] Disable the old code for scrolling via keyboard shortcuts as it is buggy. To be fixed later... 2020-02-09 00:38:31 +01:00
Hermès Bélusca-Maïto 421150d5c3
[CONSRV] Minor code cleanup. 2020-02-09 00:37:44 +01:00
Hermès Bélusca-Maïto d9cbe7dc64
[CONSRV] Fix the definitions of the Console[Input|Output]UnicodeToAnsiChar() and Console[Input|Output]AnsiToUnicodeChar() macros. 2020-02-09 00:37:44 +01:00
Hermès Bélusca-Maïto 07f8b9fe09
[CONSRV] Rephrase/complete some comments. 2020-02-09 00:37:43 +01:00
Aaron Dewes e5813c4644
Update german translation (#2291)
* Update German translations

* Update translation again

* More translations

* Some fixes in the german translation

* Some more fixes

* Little translation tweak

* Updates to 2nd review

* Little update

* Add back keyboard accel for IDS_OPENFILELOCATION.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-02-08 12:55:53 +01:00
Hermès Bélusca-Maïto b97977db9c
[USER32] Update the translations of IDS_ASK_TERMINATE. 2020-02-07 19:07:22 +01:00
Assis Duarte 567b2d79fc
[USER32] Update Brazilian-Portuguese translation (#2283) 2020-02-07 18:59:32 +01:00
Mark Jansen bbc97e964f
[WIN32SS] Demote a trace message 2020-01-29 22:58:43 +01:00
Hervé Poussineau 99f979d6e9 [WIN32SS] Replace inline by FORCEINLINE, as in other files of the module 2020-01-22 20:57:42 +01:00
Katayama Hirofumi MZ 8dc90a4c7e [WIN32SS][USERSRV] Add CSR API_NUMBER comments 2020-01-20 08:06:40 +09:00
Katayama Hirofumi MZ b41299470b
[WIN32SS][WINSRV] Fullwidth character handling Part 2 (#2240)
Follow-up of #2231. Also fix FillConsoleOutputAttribute, WriteConsoleOutputCharacterW and WriteConsoleOutputAttribute functions.
CORE-12451
2020-01-12 22:04:57 +09:00
Katayama Hirofumi MZ fa42794a3a
[WIN32SS][WINSRV] Fullwidth character handling for Asian console (#2231)
Far-East Asian language (Chinese, Japanese and Korean; CJK) needs special handling in console.
Especially a fullwidth character (mk_wcwidth_cjk(ch) == 2) needs a double width space. A fullwidth character on the console window is treated as a pair of a leading byte and a trailing byte (COMMON_LVB_LEADING_BYTE and COMMON_LVB_TRAILING_BYTE). CORE-12451
2020-01-07 15:26:58 +09:00
Katayama Hirofumi MZ f84963b0d5
[WIN32SS][WINSRV] Add CSR API_NUMBER info comments (#2192)
Add comments to improve human-readability and referencing of CSR API. CORE-12451
2019-12-31 09:21:42 +09:00
Thomas Faber ef103d7d69
[WIN32K:NTUSER] Avoid user memory access outside of SEH in NtUserEnumDisplaySettings. 2019-12-29 20:08:51 +01:00
Thomas Faber 3d81dc48a7
[WIN32K:NTUSER] Correctly capture UNICODE_STRING in NtUserEnumDisplaySettings. 2019-12-29 20:08:44 +01:00
Thomas Faber be92be2e37
[WIN32K:NTUSER] Add missing probe in NtUserGetClassName. 2019-12-29 20:08:30 +01:00
Hermès Bélusca-Maïto a8e7defb01
[WIN32SS:USER] Some minimal work and fixes concerning message queues timeouts.
CORE-15147

- Rename CLIENTTHREADINFO::tickLastMsgChecked into timeLastRead as
  documented in https://reactos.org/wiki/Techwiki:Win32k/CLIENTTHREADINFO .
  This is the last time the message queue was read.

- This is the structure member one must compare against the current tick
  count timestamp in order to heuristically determine whether a message
  queue thread is hung!! Fix MsqIsHung() in accordance, add extra debug
  logging in order to help us determining which of our code present
  regular GUI hangs, and add as well an extra "TimeOut" parameter so as
  not to hardcode a fixed value within that function but instead
  allowing its caller to specify possible different values.

- THREADINFO::timeLast is on the contrary the last message time stamp,
  and will definitively differ from CLIENTTHREADINFO::timeLastRead .
  It should only be used for information purposes!

- Accordingly, in NtUserGetThreadState()::THREADSTATE_UPTIMELASTREAD
  and in InitThreadCallback(), only (re-)initialize the timeLastRead
  member of the CLIENTTHREADINFO structure of the THREADINFO of interest.

- In co_IntPeekMessage(), update more often the timeLastRead timestamp
  whenever the current message queue has been read (but NOT timeLast!!
  That one will be updated ONLY WHEN a message is found!).

- In co_IntSendMessageTimeoutSingle() first check whether the window to
  which we send the message is being destroyed, before checking for
  queue hangs etc. Collapse the logic checks for queue hang and increase
  the hang timeout check to 4 times MSQ_HUNG (== 4 * 5 seconds) and
  display a debug trace.
2019-12-29 16:14:15 +01:00
Thomas Faber 975e117780
[WIN32K:NTUSER] Add missing parameter probe in NtUserGetClassInfo. 2019-12-29 15:22:03 +01:00
Katayama Hirofumi MZ 22f883278b
[NTUSER] Fix caret display mistake (#2180)
Take care of caret visibility. co_IntSetCaretPos function wrongly drawn the caret upon invisible caret. @Doug-Lyons did test this patch. CORE-15661
2019-12-26 19:08:01 +09:00
Katayama Hirofumi MZ dfa3065e19
[CONSRV] Preparation for Asian console support (#2171)
Make preparation for console support of Chinese, Japanese and Korean (CJK) codepages. CORE-12451
- Add consrv/frontends/wcwidth.c.
- Add GuiPaintTextModeBufferCJK function.
2019-12-25 23:35:01 +09:00
Katayama Hirofumi MZ 9ce12f0b4c
[BOOTDATA][NTUSER] Fix some system parameters (#2162)
CORE-16547
- Add IconTitleWrap registry value.
- Modify gspv.dwMenuShowDelay initial value.
- Initialize gspv.bFastTaskSwitch as TRUE.
2019-12-25 18:12:43 +09:00
Hermès Bélusca-Maïto 18a51dc7f5
[VIDEOPRT][WIN32K] Use a Windows-compatible way of communicating the 'BaseVideo' state from VIDEOPRT to WIN32K.
This is done by creating the volatile key
\Registry\Machine\System\CurrentControlSet\Control\GraphicsDrivers\BaseVideo .

Also cache during first initialization of VIDEOPRT the state of the boot
options BASEVIDEO and NOVESA, so that they can be readily retrieved later
(for example, in VideoPortIsNoVesa()).
2019-12-24 13:51:20 +01:00
Katayama Hirofumi MZ eba2d5d30a
[BOOTDATA][NTUSER] Fix GetSystemMetrics values (#2137)
Fix user32!GetSystemMetrics values. CORE-16547
SM_MENUDROPALIGNMENT and SM_CXSMSIZE
2019-12-21 22:38:49 +09:00
Katayama Hirofumi MZ 2af9e7dfac
[USER32] Add ICO_ExtractIconExW RetPtr NULL check (#2149)
CORE-16557
2019-12-16 20:37:23 +09:00
Hermès Bélusca-Maïto bfd8a84865
[BLUE] Improve initialization and interfacing with INBV.
CORE-15901

This fixes display reset transition when an external module acquired
INBV ownership and then released it, similarly to what was done in
commit 0ad65796 for VIDEOPRT.

For this a backup screenbuffer is used to store the contents of the
screen just before an INBV screen acquire transition, and these contents
are restored when it is detected that INBV ownership has been released.
Also, the active text font associated with the active console code-page
is restored, as well as the cursor state and shape.

In addition, any user of BLUE.SYS is now required to explicitly issue
a new IOCTL_CONSOLE_RESET_SCREEN to either enable or disable the screen.
This allows avoiding nasty unwanted screen mode switches when a handle
to the \Device\BlueScreen device is opened but no screen mode switch was
actually wanted - This "fixes" this annoyance on ReactOS and Windows,
when these are running witha VGA-compatible video driver and one wants
to look at properties of the \Device\BlueScreen device using
Sysinternals' WinObj.

Following this, we don't need to check anymore for explicit INBV
ownership by issuing calls to InbvCheckDisplayOwnership(), but instead
we check whether the screen has beeen manually enabled using the
aforementioned IOCTL. This partly supersedes commit 8b553a4b, and allows
fixing the second bug, namely that if we start ReactOS without the
/NOGUIBOOT option (and thus, INBV is active during boot), USETUP would
not show up anything because BLUE.SYS wouldn't display anything on screen.
See CORE-15901.

[USETUP][CONSRV] Call IOCTL_CONSOLE_RESET_SCREEN to tell BlueScreen device to enable the screen.
2019-12-15 03:37:52 +01:00
Doug Lyons c917c442ad [CONSRV] Fix for console windows shrinking on Minimize and Restore (#2014)
CORE-14200
2019-12-14 16:51:49 +01:00
Katayama Hirofumi MZ 2d4d3f5fce
[COMCTL32][USER32] Fix radio button regression (#2146)
PR #2135 (e329e83) caused radiobutton regression. This PR will fix it.
- Clear DT_BOTTOM | DT_VCENTER flags upon calculating the button text height.
CORE-16552
2019-12-10 11:07:56 +09:00
jimtabor d447b41198 Merge branch 'master' of https://github.com/reactos/reactos 2019-12-09 11:19:18 -06:00
jimtabor 5214a38fd0 [Win32SS] Fix Opaque Text Fade while in Desktop Startup
See CORE-16498.
2019-12-09 11:18:32 -06:00
Katayama Hirofumi MZ e329e83857
[WIN32SS][COMCTL32] Improve button text position (#2135)
Improve DrawText function especially DT_CALCRECT and DT_VCENTER. CORE-15478
2019-12-09 21:16:28 +09:00
Katayama Hirofumi MZ 1793dcc864
[NTUSER] Improve loading settings (SystemParamtersInfo) (#2139)
Fix SPI_GETSCREENSAVETIMEOUT, SPI_GETKEYBOARDSPEED and SPI_GETKEYBOARDDELAY values. CORE-16547
2019-12-09 10:50:04 +09:00
Joachim Henze bd149e8a11 [CONSRV] Speed up console txt output CORE-16187
By demoting good-path DPRINT1 to DPRINT.
HBelusca agreed.

The more important commit to solve CORE-16187 has
been done beforehand in 0.4.14-dev-553-g
1dcdb4c2d0
2019-12-07 18:35:06 +01:00
Katayama Hirofumi MZ 007f32a223
[WIN32SS][WINSRV] Do CJK font choose workaround (#2134)
Don't choose Asian charset font if there is no preferred font for CJK. CORE-12451
2019-12-06 22:18:51 +09:00
Katayama Hirofumi MZ 1dcdb4c2d0
[WIN32SS][WINSRV] Optimize console background drawing (#2132)
Console needs speed. This PR will optimize drawing of console.
- Set NULL to the background brush.
- Skip WM_ERASEBKGND.
2019-12-05 20:19:00 +09:00
Hermès Bélusca-Maïto 0ad65796bb
[WIN32K][VIDEOPRT] Improve initialization and interfacing with INBV.
CORE-12149

VIDEOPRT:
=========

Improve interfacing with INBV, so as to detect when an external module
acquired INBV display ownership, and whether ownership is being released
later on. (This does NOT rely on hooking!)

For this purpose we improve the IntVideoPortResetDisplayParameters(Ex)
callback that gets registered with an InbvNotifyDisplayOwnershipLost()
call during initialization, and we add a monitoring thread.

The callback is called whenever an external module calls
InbvAcquireDisplayOwnership(), for example the bugcheck code or the KDBG
debugger in SCREEN mode. When this happens, a flag that tells the
monitoring thread to start monitoring INBV is set (ReactOS-specific),
and the display adapters get reset with HwResetHw() (as done on Windows).

Due to the fact that this INBV callback can be called at *ANY* IRQL, we
cannot use dispatcher synchronization mechanisms such as events to tell
the INBV monitoring thread to start its operations, so we need to rely
instead on a flag to be set. And, since INBV doesn't provide with any
proper callback/notification system either, we need to actively monitor
its state by pooling. To reduce the load on the system the monitoring
thread performs 1-second waits between each check for the flag set by
the INBV callback, and during checking the INBV ownership status.

When the INBV ownership is detected to be released by an external module,
the INBV callback is re-registered (this is *MANDATORY* since the
external module has called InbvNotifyDisplayOwnershipLost() with a
different callback parameter!), and then we callout to Win32k for
re-enabling the display.

This has the virtue of correctly resetting the display once the KDBG
debugger in SCREEN mode is being exited, and fixes CORE-12149 .

The following additional fixes were needed:

VIDEOPRT & WIN32K:
==================

Remove the registration with INBV that was previously done in a ReactOS-
specific hacked IRP_MJ_WRITE call; it is now done correctly during the
video device opening done by EngpRegisterGraphicsDevice() in the VIDEOPRT's
IRP_MJ_CREATE handler, as done on Windows.

WIN32K:
=======

- Stub the VideoPortCallout() support, for VIDEOPRT -> WIN32 callbacks.
  This function gets registered with VIDEOPRT through an
  IOCTL_VIDEO_INIT_WIN32K_CALLBACKS call in EngpRegisterGraphicsDevice().

- Only partially implement the 'VideoFindAdapterCallout' case, that just
  re-enables the primary display by refreshing it (using the new function
  UserRefreshDisplay()).

VIDEOPRT:
=========

- PVIDEO_WIN32K_CALLOUT is an NTAPI (stdcall) callback.

- In the IntVideoPortResetDisplayParameters(Ex) callback, reset all the
  "resettable" adapters registered in the HwResetAdaptersList list.
  We thus get rid of the global ResetDisplayParametersDeviceExtension.

- Make the IntVideoPortResetDisplayParameters(Ex) callback slightly more
  robust (using SEH) against potential HwResetListEntry list corruption
  or invalid DriverExtension->InitializationData.HwResetHw() that would
  otherwise trigger a BSOD, and this would be disastrous since that
  callback is precisely called when INBV is acquired, typically when the
  BSOD code initializes the display for displaying its information...

Extras:
- Validate the IrpStack->MajorFunction in IntVideoPortDispatchDeviceControl()
  and implement IRP_MJ_SHUTDOWN handling. Stub out the other IOCTLs that
  are handled by VIDEOPRT only (and not by the miniports).

- VIDEOPRT doesn't require IRP_MJ_INTERNAL_DEVICE_CONTROL (unused).

- Implement IOCTL_VIDEO_PREPARE_FOR_EARECOVERY that just resets the
  display to standard VGA 80x25 text mode.
2019-12-02 02:33:20 +01:00
Hermès Bélusca-Maïto 0ad90f83d3
[WIN32K] Code formatting. 2019-11-25 00:41:49 +01:00
Katayama Hirofumi MZ 141cf04239
[NTUSER] Fix condition of HSHELL_WINDOWCREATED (#2046)
CORE-15655
If the owner window doesn't exist or is invisible or has WS_EX_TOOLWINDOW style, HSHELL_WINDOWCREATED regards the window a non-owned window. You can watch the shell hook information by using CORE-15655 ShellHookChecker.zip.
2019-11-19 17:54:23 +09:00
Katayama Hirofumi MZ fa264251a7 [USER32] Check whether the window is minimized upon SM_REPOSITION CORE-16490 2019-11-19 10:32:06 +09:00
Katayma Hirofumi MZ f981a68ee0 [USER32] Improve DM_REPOSITION CORE-16490 2019-11-16 12:52:40 +09:00
Katayma Hirofumi MZ 657887adf4 [USER32] Fix DM_REPOSITION (rc.bottom minus 4) 2019-11-16 11:21:16 +09:00
Katayama Hirofumi MZ 8249d2a3fa
[USER32] Implement DM_REPOSITION message (#2020)
DM_REPOSITION is dialog message that can reposition the dialog to the workarea when the dialog is partially/entirely in outside of the workarea. CORE-16490
2019-11-16 09:51:16 +09:00
Katayama Hirofumi MZ 462b1b7444
[NTUSER] Support MK_SHIFT/MK_CONTROL of mouse messages (#2038)
Upon mouse message generation, The states of Shift key and/or Ctrl key must be used. If Shift key is pressed, it enables MK_SHIFT flag of the mouse message. If Ctrl key is pressed, it enables MK_CONTROL flag of the mouse message. CORE-16279
2019-11-16 09:49:49 +09:00
Joachim Henze 19fbdda95c [WIN32SS] Prevent disabled scrollbars being clickable CORE-15557
Thanks to JIRA user 'I_Kill_Bugs.

VBox: https://reactos.org/testman/compare.php?ids=69671,69747
KVM: https://reactos.org/testman/compare.php?ids=69672,69748
2019-11-09 15:50:50 +01:00
James Tabor 34b4b96461 [User32] Properly handle WM_CTLCOLOR* messages.
Patch by Fabian Maurer : Properly handle WM_CTLCOLOR* messages.

See CORE-15560 and
fbec0ba9ee
.

Added support for module versions.
2019-11-06 21:43:00 -06:00
Hermès Bélusca-Maïto 3b2f158593
[NTOS][CLASS2][FFS][WIN32SS] Fix some pool tags so that they correctly appear in pool dump lists.
Reminder: in the code they are defined using reverse byte order
(Windows/ReactOS are little-endian OSes).
2019-11-01 19:12:27 +01:00
Katayama Hirofumi MZ b3033b81a4
[WIN32SS][NTUSER][USER32] Fix menu checkmarks (#2009)
CORE-16470
The checkmarks of menu were black boxes. This PR will fix drawing.
- Don't change background mode.
2019-11-01 09:52:18 +09:00
Joachim Henze 9e14a762d5 [WIN32SS] Fix last user visible parts of regression CORE-10855
When Themesvc was disabled, some Window titlebar
frames were drawn too thin until the window
was actively resized in y by the user.

That and similar symptoms started to show up after SVN r68904 ==
6dfa71c487

Many thanks to patches author Doug Lyons.

We leave the ticket unresolved still due to explicit request of
James Tabor, who wants to continue working in that context.

I will merge that back into 0.4.13RCs as well.
2019-10-25 00:42:01 +02:00
Mark Jansen e1984d03b4
[WIN32K:menu] Use signed types for negative values...
CORE-16306
2019-10-12 16:19:58 +02:00
Joachim Henze 96ef605f4b [WIN32SS] Fix regression CORE-16393
Symptom "cmd did not hide the taskbar anymore when switching to fullscreen"

It regressed by SVN r75407 == git
09ab5ea7ed

VBox LGTM https://reactos.org/testman/compare.php?ids=69295,69297
 KVM LGTM https://reactos.org/testman/compare.php?ids=69296,69298

Many thanks to the patches author James Tabor.
2019-10-11 23:21:39 +02:00
James Tabor 1f78e8ec47 [Win32SS] Support Module Versioning.
Set the appropriate flags supporting versions of software modules.
Fix arguments for getting desktop DC.
2019-09-24 17:40:18 -05:00
James Tabor c57d4d7b9e [User32|Tests] Sync Port Wine Combo Controls.
Need to cross check these changes with WINE ComCtl32 before you PANIC
HACK!!!!

Not in order:
Piotr Caban : Remove unneeded RECT parameter from CBPaintText helper.
              Don't invalidate ComboBox on CB_SETCURSEL message.
Don't invalidate ComboBox on LBN_SELCHANGE and
LBN_SELCANCEL.
              Add more CB_SETCURSEL tests on ComboBox.
              Redraw combo text field even if it's empty.
Let ComboBox edit control handle the redraw even if
CBF_NOREDRAW is set.
Don't do the painting if combobox is not visible in
CBPaintText.

Dmitry Timoshkov : Don't force a combobox repaint on WM_SIZE.

This breaks z-order based painting and causes side effects
for
applications that during the WM_PAINT processing reference
internal
             data associated with a not fully initialized window.
Ref :
2d9e3236ea

Fabian Maurer : Set listbox popup height correctly and add tests.

                Properly set dropdown height.

             Now that user32 and comctl32 combo are separated,
             this won't lead to a regression anymore
             Ref :
3d0be0bad8
             Info by Sebastian Lackner Ref:
f0fc034997

Nikolay Sivov : Remove some misleading TODOs and confusing comments.
2019-09-21 08:47:56 -05:00
Katayama Hirofumi MZ 81e27f0be7
[WIN32SS][NTUSER] Fix hit test position of popup menu
The submenu of desktop popup menu was erroneously shown at first right click.
- Fix the hit test position that was modified by window style change.
CORE-16382
2019-09-21 18:21:17 +09:00
Stanislav Motylkov b16ca9cd65 [WIN32SS][NTUSER] Fix debug print in winpos.c (#1893) 2019-09-12 15:53:29 +02:00