Commit graph

603 commits

Author SHA1 Message Date
Katayama Hirofumi MZ f34b8460e3
[NTUSER] Use assignment-lock against THREADINFO.KeyboardLayout (#4620)
- Assignment and locking are managed by UserAssignmentLock/UserAssignmentUnlock.
- Synchronize ClientInfo->hKL to pti->KeyboardLayout->hkl.
CORE-11700, CORE-18317
2022-08-23 19:32:23 +09:00
Katayama Hirofumi MZ 6c748ca8a9
[NTUSER] Rewrite NtUserUnloadKeyboardLayout (#4613)
- Add co_IntUnloadKeyboardLayoutEx (Win: xxxInternalUnloadKeyboardLayout), IntUnloadKeyboardLayout (Win: xxxUnloadKeyboardLayout) helper functions.
- Rewrite NtUserUnloadKeyboardLayout function.
CORE-11700
2022-08-20 09:45:06 +09:00
Katayama Hirofumi MZ c06cccea22
[USER32] Adjustment for IME/IMM (#4610)
- Add IS_CICERO_MODE() macro.
- Append DWORD dwLastStatus to IMEUI structure.
- Modify ImeWndProc_common, ImeWnd_OnCreate, ImeWnd_OnImeSelect, and ImeWnd_OnImeControl functions.
CORE-11700
2022-08-18 10:55:11 +09:00
Katayama Hirofumi MZ 93955f37de
[NTUSER][USER32] Define NtUserSetWindowLongPtr for non-Win64 (#4612)
- Add NtUserSetWindowLongPtr macro on non-Win64.
- Use NtUserSetWindowLongPtr instead of NtUserSetWindowLong.
CORE-11700
2022-08-17 17:23:40 +09:00
Katayama Hirofumi MZ fd1e799123 [USER32] Insert curly-brackts for switch-case
Follow-up of #4607 (60be15f).
CORE-11700
2022-08-17 08:04:11 +09:00
Katayama Hirofumi MZ e44e151840
[NTUSER] Empower co_UserActivateKeyboardLayout (#4608)
- Add code to co_UserActivateKeyboardLayout function for IME.
- Add IntImmActivateLayout helper function.
CORE-11700
2022-08-16 22:03:54 +09:00
Katayama Hirofumi MZ fe8f80610e
[NTUSER] Send WM_IME_SYSTEM:IMS_LOADTHREADLAYOUT at IntCreateWindow (#4606)
- Send WM_IME_SYSTEM:IMS_LOADTHREADLAYOUT message at IntCreateWindow function.
CORE-11700
2022-08-16 08:02:49 +09:00
Katayama Hirofumi MZ 60be15ff5d
[USER32] RealDefWindowProcA/W WM_IME_SYSTEM handling (#4607)
- Add WM_IME_SYSTEM message handling on RealDefWindowProcA and RealDefWindowProcW functions.
- Improve WM_IME_... messages handling.
- s/IMMGWL_IMC/IMMGWLP_IMC/
- Don't set IMMGWLP_IMC value to the default IME window.
CORE-11700
2022-08-16 08:00:47 +09:00
Katayama Hirofumi MZ 379188acfe
[NTUSER] Refactor NtUserUnloadKeyboardLayout (#4605)
- Add IntHKLtoPKL, co_UserActivateKeyboardLayout, IntReorderKeyboardLayouts, and co_IntActivateKeyboardLayout helper functions.
- Rewrite NtUserUnloadKeyboardLayout by using helper functions.
CORE-11700
2022-08-15 08:25:06 +09:00
Katayama Hirofumi MZ e8ccc8516f
[USER32] Call CliImmInitializeHotKeys on LoadKeyboardLayoutW epilogue (#4604)
Enable the IME hotkeys.
- Call CliImmInitializeHotKeys.SETIMEHOTKEY_ADD on IntLoadKeyboardLayout epilogue.
CORE-11700
2022-08-14 10:53:58 +09:00
Katayama Hirofumi MZ 25fcdc5c2b
[USER32][IMM32][INCLUDE] Empower WM_IME_SYSTEM handling (#4603)
- Add code to ImeWnd_OnImeSystem function.
- Add CtfLoadThreadLayout and User32DoImeHelp helper functions.
- Define IMS_... constants (for WM_IME_SYSTEM wParam) and fix some magic numbers.
CORE-11700
2022-08-13 07:08:18 +09:00
Katayama Hirofumi MZ 1381cea2a7
[USER32] Refactoring on LoadKeyboardLayout(W/Ex) (#4601)
- Add IntLoadKeyboardLayout (Win: LoadKeyboardLayoutWorker) helper function.
- Use it in LoadKeyboardLayoutW and LoadKeyboardLayoutEx functions.
CORE-11700
2022-08-12 09:16:18 +09:00
Katayama Hirofumi MZ d519b11a28
[NTUSER] Security: Follow-up of #4595 (#4598)
Improve security. CORE-11700
2022-08-08 21:23:49 +09:00
Katayama Hirofumi MZ 3e42f7b478
[NTUSER][USER32] NtUserGetKeyboardLayoutName and GetKeyboardLayoutNameW (#4595)
#4594 has proved that the 1st argument of NtUserGetKeyboardLayoutName has type PUNICODE_STRING.
CORE-11700
2022-08-06 08:02:31 +09:00
Katayama Hirofumi MZ 5f4db56486
[NTUSER] KLF_UNLOAD flag of NtUserGetKeyboardLayoutList (#4592)
This implementation enables KLF_UNLOAD flag awareness on listing the KLs.
CORE-11700
2022-08-03 12:45:10 +09:00
Katayama Hirofumi MZ b9ecf4b055
[NTUSER] Release WinSta->spklList at IntWinStaObjectDelete (#4593)
Call UserAssignmentUnlock((PVOID*)&WinSta->spklList); in IntWinStaObjectDelete function.
CORE-11700
2022-08-02 10:46:37 +09:00
Katayama Hirofumi MZ 6c1b65d7a4
[NTUSER] Improve WINSTATION_OBJECT compatibility (#4591)
- Modify WINSTATION_OBJECT structure with inserting struct tagKL *spklList member.
- Add some C_ASSERT(offsetof(WINSTATION_OBJECT, ...) == ...);.
CORE-18252
2022-07-31 10:25:07 +09:00
Katayama Hirofumi MZ ffbdb7d39e
[IMM32][USER32] ImmPutImeMenuItemsIntoMappedFile (#4588)
Implement inter-process menu item retrieving.
CORE-11700
2022-07-23 05:58:17 +09:00
Mark Jansen 81e0f74a7a
[WIN32K] Conditionally enable IMM32
MFC42 applications only expect an IME window when on a DBCS system,
so they will capture this IME window as their 'main' window on non-DBCS systems.
CORE-18212
2022-06-08 19:19:59 +02:00
Hervé Poussineau 2915d16543 [WIN32SS:USER] Do not write error message at end of enumeration in UserEnumDisplayDevices() 2022-06-08 07:58:12 +02:00
Stanislav Motylkov 26b88af642
[WIN32SS] Add missing code parts for monitor handling
- [VIDEOPRT] Add stub for IOCTL_VIDEO_ENUM_MONITOR_PDO.

- [WIN32SS:ENG] Add missing checks and comments.

- [WIN32SS:NTUSER] Add missing monitor handling and comments.

Addendum to 31827c43. CORE-18197 CORE-11715
2022-05-30 15:28:44 +03:00
Stanislav Motylkov 31827c43b6
[WIN32SS] EnumDisplayDevices: Fill DeviceID field properly
- [VIDEOPRT] Return the real PhysicalDeviceObject in Win32k callbacks.

- [WIN32SS:ENG] Pass PhysDeviceObject into the GraphicsDevice structure
  and rename the destination field accordingly.

- [WIN32SS:NTUSER] Request hardware identifiers from device PDO and
  fill DISPLAY_DEVICE's DeviceID field with the first identifier.

Now it's correctly passed to the usermode, and Desktop Propertes applet
can open the video adapter device properties.

Thanks to Hervé Poussineau for the help.

CORE-18197 CORE-11715
2022-05-30 15:28:21 +03:00
Stanislav Motylkov 8b55d712a7
[GITHUB] Add MSVC ARM64 builder
This builds only some applications for now.

CORE-17518
2022-05-25 21:10:17 +03:00
Justin Miller 4363e74ddc
[REACTOS] Finally get some ARM64 applications building (#4517)
- Add some missing ARM64 exports to ntdll, kernel32 and user32
- Create mmtypes header file based on WoA debug symbols
- Get the remaining headers in order, so we can build ARM64 apps
- Adjust subsystem version for binaries so they can run on WoA host
- Get calc, notepad and more base apps to build for ARM64 platform

CORE-17518

Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-25 17:06:32 +03:00
Hermès Bélusca-Maïto d21895e6ef
[WIN32K:NTUSER] Only call IntFreeSecurityBuffer() when needed, don't free NULL buffers.
Addendum to 878c2f44.
2022-05-23 19:30:13 +02:00
Hervé Poussineau 63e59e10f3 Revert "[WIN32SS] Only refresh graphics mode list when iModeNum = 0"
This reverts commit c243133b2c.

Without the revert, VirtualBox auto-resize doesn't work on first attempt,
but only on next ones.
However, according to documentation, we must only initialize device and
cache information when iModeNum = 0.

CORE-18189
2022-05-22 23:42:00 +02:00
Hervé Poussineau c243133b2c [WIN32SS] Only refresh graphics mode list when iModeNum = 0
We don't expect graphics mode list to change while enumerating it.
2022-05-22 17:31:40 +02:00
Luke Luo de972e2bc2
[TRANSLATION] Improve Simplified Chinese (zh-CN) translation (#4513)
- Changed some wording according to the translation requirements.
- Fixed some mistakes.
- Changed my name.

Reviewed-by: He Yang <1160386205@qq.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-20 15:38:24 +03:00
Katayama Hirofumi MZ 99d9fc698f
[KBDJA][NTUSER] Improve scancode_to_vk data (#4515)
- Fix scancode_to_vk variable.
- Add special handling to win32k!ProcessKeyEvent function for Japanese.
CORE-11700
2022-05-15 12:53:12 +09:00
Katayama Hirofumi MZ fcc4384554
[USER32][KBDJA] Implement CliImmSetHotKey (#4504)
- Fix Japanese keyboard about [Shift]+[0] and [半/全] (VK_PROCESSKEY).
- Add user32!CliSaveImeHotKey helper function.
- Implement user32!CliImmSetHotKey function. This function is forwarded from imm32!ImmSetHotKey.
- Fix user32!TranslateMessage by using imm32!ImmTranslateMessage.
CORE-11700, CORE-18183, CORE-18182
2022-05-11 21:42:32 +09:00
Katayama Hirofumi MZ 7396ba84ce
[USER32] Implement UnloadKeyboardLayout (#4503)
- Add IntSetFeKeyboardFlags, CliImmSetHotKeyWorker, CliSetDefaultImeHotKeys, CliGetPreloadKeyboardLayouts, CliGetImeHotKeysFromRegistry, CliImmInitializeHotKeys, CliSetSingleHotKey, and CliReadRegistryValue helper functions.
CORE-11700
2022-05-11 10:03:02 +09:00
George Bișoc aa815e1cfa
[WIN32K:NTUSER] Assign a security descriptor when parsing the desktop object
The problem ReactOS currently faces is this -- whenever the desktop is being parsed we aren't assigning a security descriptor to it. As a matter of fact when Winlogon tries to assign new security information to the application desktop when a user logs in, Winlogon fails because no prior descriptor has been created for it even though we already do this when initializing security buffers in Winlogon.

With that said, we must assign a descriptor when parsing the desktop as well. This fixes a hack in Winlogon where security assigning of application desktop during a log in is disabled (which we can now enable such code path back).
2022-05-08 20:16:15 +02:00
Katayama Hirofumi MZ 242e0b4303
[NTUSER][USER32] Implement IME status (#4472)
- Add IntCheckImeShowStatus, IntSendMessageToUI, IntSendOpenStatusNotify, IntNotifyImeShowStatus, and xxxBroadcastImeShowStatusChange helper functions.
- Renaming: s/X_ROUTINE_IMESHOWSTATUSCHANGE/TWOPARAM_ROUTINE_IMESHOWSTATUSCHANGE/
- Implement NtUserCallNoParam.NOPARAM_ROUTINE_GETIMESHOWSTATUS.
- Implement NtUserCallHwndParamLock.TWOPARAM_ROUTINE_IMESHOWSTATUSCHANGE.
- Fix hung in User32GetTopLevelWindow and rename it as IntGetTopLevelWindow.
CORE-11700
2022-05-08 20:16:17 +09:00
George Bișoc 65a72fb527
[USER32] Capture the security descriptor from the caller when creating a window station
When creating a window station with CreateWindowStationW, the function ignores the security descriptor provided by the caller and instead it uses whatever descriptor the system can find.
2022-05-06 10:09:48 +02:00
George Bișoc 878c2f4444
[WIN32K:NTUSER] Implement security infrastructure for NTUSER component
Implement a base security infrastructure with code that sets up a security descriptor for the service that we're going to connect through it. Such service is based upon a desktop and a window station.

=== DOCUMENTATION REMARKS ===
The authenticated user, represented by an access token that describes its security context, is the main holder and has ultimate power against the default created desktop and window station objects in USER. The authenticated user in question
is the actual logged in user, this is the case when the server is impersonating a client. Administrators on the other hand have some share of power against default desktop but their power in question is extremely limited against the default
window station as admins can only just enumerate the available and valid handle stations within a desktop.
2022-05-06 10:09:48 +02:00
Doug Lyons de6c514c3e
[WIN32SS] Fix CF_DIB format not being saved to clipboard on Print Screen key (#3265)
Use pool to allocate (potentially huge) clipboard data buffers.
CORE-17318
2022-05-05 17:54:15 +02:00
Katayama Hirofumi MZ 056bb94edc
[NTUSER] NtUserBuildHwndList should return NTSTATUS (#4487)
A follow-up to #4485 (c2a51c7). CORE-18173
2022-05-05 22:53:15 +09:00
Katayama Hirofumi MZ c2a51c7249
[NTUSER][USER32] Make NtUserBuildHwndList exclusive (#4485)
- Modify prototype of NtUserBuildHwndList function.
- Wrap the code by UserEnterExclusive(); and UserLeave();.
CORE-18173
2022-05-05 08:49:00 +09:00
Katayama Hirofumi MZ bbc9a877cc [NTUSER] Add Win: comments to window.c
CORE-18173
2022-05-04 15:40:46 +09:00
Serge Gautherie 03422451b3 [REACTOS] Add '\n' to debug logs
on TRACE, WARN, FIXME and ERR calls.

Plus a few nit picks.
2022-05-04 03:28:38 +03:00
Katayama Hirofumi MZ 2ef605d428
[NTUSER] Fix UserDestroyInputContet (again and again) (#4482)
Add call of UserMarkObjectDestroy.
Fix hung-up. CORE-11700
2022-05-03 10:17:30 +09:00
Katayama Hirofumi MZ 4a748a3a97
[NTUSER] Fix UserDestroyInputContext (again) (#4476)
Fix the HIMC handle leak. CORE-11700
2022-05-03 03:43:26 +09:00
Katayama Hirofumi MZ 0b0e73d66e
[NTUSER] Add locking at IntSendFocusMessage (#4468)
Fix access violation on IntFocusSetInputContext.
- Add locking on pWndPrev.
CORE-18163
2022-04-25 11:36:00 +09:00
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