Commit graph

810 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 66c8ded454
[COMCTL32][USER32] EDIT: CompForm and CandForm (#5226)
The changes of this PR are on EDIT controls.
- Delete composition_len and composition_start members.
- Add EDIT_ImmSetCompositionWindow helper function.
- At EDIT_SetCaretPos, set the position of the composition window.
- We don't use internal composition string. Rely on the composition window.
- Improve WM_IME_STARTCOMPOSITION, WM_IME_COMPOSITION and WM_IME_ENDCOMPOSITION message handling.
CORE-11700
2023-04-09 15:19:19 +09:00
Katayama Hirofumi MZ 2b356adbc5
[COMCTL32][USER32] EDIT: WM_SETFONT for IME (#5214)
- Call ImmSetCompositionFontW in WM_SETFONT handling of EDIT controls if necessary.
- If the specified font is NULL, then use DEFAULT_GUI_FONT.
CORE-11700
2023-04-04 19:09:21 +09:00
Joachim Henze 9ee9f73369
[NTUSER] Fix BSOD 0x1E nullptr deref CORE-18899 (#5212)
fix authored by JIRA-user "TANGaming". I do suspect that the possibility of that nullptr deref was introduced on the master branch by 0.4.13-dev-962-g 4193b8d. Doug Lyons signalled his "ok" regarding the fix in chat already. CORE-18899
2023-04-02 23:27:42 +09:00
Katayama Hirofumi MZ 6d650bfc8f
[COMCTL32][USER32] WM_IME_CHAR: Rely on DefWindowProc... (#5191)
Use DefWindowProc... for WM_IME_CHAR handling. CORE-15289, CORE-11700
2023-03-27 19:42:47 +09:00
Thamatip Chitpong 640e2283d4
[NTUSER] VerifyWnd: Remove pointless SEH and simplify the function (#5125) 2023-03-23 10:22:10 +01:00
Katayama Hirofumi MZ 8d26b03775
[COMCTL32][USER32] EDIT: Half-implement WM_IME_SETCONTEXT handling (#5182)
Add WM_IME_SETCONTEXT handling to the window procedure of the EDIT control. CORE-11700, CORE-15289
2023-03-23 12:24:40 +09:00
Katayama Hirofumi MZ b25daf4b56
[COMCTL32][USER32] EDIT: Half-implement WM_IME_STARTCOMPOSITION (#5183)
Improve WM_IME_STARTCOMPOSITION handling in the window procedure of the EDIT control. CORE-15289, CORE-11700
2023-03-23 12:24:00 +09:00
Katayama Hirofumi MZ be518f9f5a
[COMCTL32][USER32] EDIT: Default processing on WM_IME_SELECT/WM_IME_CONTROL (#5173)
Do default processing on WM_IME_SELECT and WM_IME_CONTROL messages in EDIT controls. CORE-11700, CORE-15289
2023-03-22 09:09:38 +09:00
Katayama Hirofumi MZ 1ef98fff3b [NTUSER] ime.c: Add parameter to ERR(...)
Follow-up of 94f22bd.
CORE-11700
2023-03-21 07:21:31 +09:00
Katayama Hirofumi MZ 94f22bda27 [NTUSER] ime.c: Add ERR(...) to the exception handlers
CORE-11700
2023-03-20 19:12:25 +09:00
Katayama Hirofumi MZ 0694b559da [NTUSER] NtUserSetImeInfoEx: Use _SEH2_YIELD
CORE-11700
2023-03-20 19:10:04 +09:00
Katayama Hirofumi MZ ed5098b2c9 [NTUSER] NtUserGetImeInfoEx: Use _SEH2_YIELD
CORE-11700
2023-03-20 19:08:38 +09:00
Katayama Hirofumi MZ ef20cc081f [NTUSER] NtUserBuildHimcList: Use _SEH2_YIELD
CORE-11700
2023-03-20 19:06:44 +09:00
Katayama Hirofumi MZ b301333517 [NTUSER] NtUserGetImeHotKey: Use _SEH2_YIELD
CORE-11700
2023-03-20 19:04:18 +09:00
Katayama Hirofumi MZ 9751d03c3b [NTUSER] IntSendMessageToUI: Use _SEH2_YIELD
CORE-11700
2023-03-20 18:59:42 +09:00
Katayama Hirofumi MZ 4ab7c93b35 [NTUSER] IntNotifyImeShowStatus: Use _SEH2_YIELD
CORE-11700
2023-03-20 18:49:23 +09:00
Joachim Henze 2aea4ab945 [NTUSER] Scrollbar.c pure whitespace fixes
The scrollbar code is now finally in a good shape.
Therefore I will port the current state back today,
and for that I want to have the formatting in good shape.

No functional changes!
2023-03-12 10:34:50 +01:00
Katayama Hirofumi MZ b9ef348ab0
[NTUSER][USER32] KLF_SETFORPROCESS for ActivateKeyboardLayout (#5126)
Supporting KLF_SETFORPROCESS flag in ActivateKeyboardLayout function.

Implement KLF_SETFORPROCESS for co_UserActivateKeyboardLayout.
Use KLF_SETFORPROCESS flag in WM_INPUTLANGCHANGEREQUEST handling.
Add co_IntSetKeyboardLayoutForProcess helper function.
2023-03-12 13:39:41 +09:00
Thomas Faber 8e0c920fd2
[WINESYNC] user32/edit: Allow buffer access after EM_GETHANDLE.
wine commit id f62d8dc58fb3fb5f11a8ab55620ab9b2fbdaf967 by Nikolay Sivov <nsivov@codeweavers.com>
2023-03-07 21:48:06 -05:00
Katayama Hirofumi MZ 77e6348f5f
[NTUSER][USER32] Refactor NtUserLoadKeyboardLayoutEx (#5107)
- Split some code of NtUserLoadKeyboardLayoutEx to newly-added co_IntLoadKeyboardLayoutEx helper function.
- Modify NtUserLoadKeyboardLayoutEx prototype.
- Move co_UserImmLoadLayout code.
- Implement KLF_REORDER.
- Rename UserLoadKbdLayout as co_UserLoadKbdLayout.
- Improve LoadKeyboardLayoutEx.
CORE-11700
2023-03-05 11:41:32 +09:00
Doug Lyons 60851914a8 Fix ICO_ExtractIconExW causing explorer to crash when trying
to display icon for bad EXE PE header.

See CORE-15879

 Co-authored-by: Thomas Faber <thomas.faber@reactos.org>
2023-02-27 22:28:41 +01:00
Mark Jansen 76753cd342
[USER32] Fix edit UAF by importing wine commit b40ddf42370e8344a862fbbc40384678db3871a9 2023-02-25 23:41:41 +01:00
Katayama Hirofumi MZ 95a64cbdd2
[NTUSER] Send WM_IME_SYSTEM:IMS_UPDATEIMEUI (#5075)
Send WM_IME_SYSTEM:IMS_UPDATEIMEUI message after window position change to improve IME UI sync. CORE-11700, CORE-15289
2023-02-22 08:35:55 +09:00
Joachim Henze d04e148d1c
[NTUSER] Optimize Window Snap Disabling (#5061) 2023-02-16 19:33:37 +01:00
Suleyman Poyraz 2ea56af2e8
[TRANSLATION] Add/Update Turkish (tr-TR) translations (#4959)
Programs: at, charmap, diskpart, drwtsn32, explorer, fc, fontview, format, reg, timeout, where, wmic,
mspaint, regedit, runas, rundll32, subst, utilman, umandlg, w32time, winlogon

Tools: arping, vgafontedit, explorer-old, fraginator, fontsub, systeminfo, vcdcontroltool
CPLs: desk, hotplug, input, sysdm
DLLs: newdev, syssetup, user32

Themes: lunar
Screensavers: blankscr, butterflies, circles, cylfrac, matrix, mazescr, ssstars, starfield

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2023-02-15 17:29:52 +01:00
Thamatip Chitpong 0fee1fc80c
[NTUSER] IntWinListOwnedPopups: Exclude default IME window from the list (#5069)
And in IntShowOwnedPopups: Remove the window owner check hack as it's no longer needed.
Based on my observation, the owner of the default IME window can change and it depends on
the window that is being focused.

CORE-18659
CORE-18768
2023-02-14 21:57:41 +01:00
Katayama Hirofumi MZ 7014f63057 [NTUSER] Add 'Win:' comments to co_UserHideCaret and co_UserShowCaret
CORE-11700
2023-02-14 10:57:25 +09:00
Katayama Hirofumi MZ 73c1a8d19f [NTUSER] Add 'Win:' comment to IntRealChildWindowFromPoint
CORE-11700
2023-02-14 10:45:19 +09:00
Katayama Hirofumi MZ 83b8cb96f7 [NTUSER] Add 'Win:' comment to IntChildWindowFromPointEx
CORE-11700
2023-02-14 10:43:37 +09:00
Katayama Hirofumi MZ 798d0352a0 [NTUSER] Add 'Win:' comment to IntDeferWindowPos
CORE-11700
2023-02-14 10:39:26 +09:00
Katayama Hirofumi MZ 9140300c2a [NTUSER] Add 'Win:' comment to IntEndDeferWindowPosEx
CORE-11700
2023-02-14 10:30:22 +09:00
Doug Lyons 57eb2a6bf4
[NTUSER] Missing "X" on "Folder" pane when Right Click > Explore from Desktop icons & Rapps toolbar errors (#5068)
Fix for right-clicking on 'My Computer' and selecting 'explore' and there is no 'X' for the title bar in the Folders pane
Also fixes Rapps missing toolbar combo box and edit box controls that were not displayed.

This is a complete revert of #4995 (commit 7866eb2) while still retaining its fixes.

CORE-18830, CORE-18817

Co-authored-by: I_Kill_Bugs
2023-02-13 15:27:40 +01:00
Joachim Henze 5ad5737370
[NTUSER] Delete temporary workarounds in co_IntSetScrollInfo() (#4985)
fixes JIRA issue: CORE-18050

improves the code by removing ancient hacks (the static variables)

reduces testbot failures
VBox: https://reactos.org/testman/compare.php?ids=85831,85832 LGTM (-2 failures in user32:scroll for both bots)
KVM: https://reactos.org/testman/compare.php?ids=85829,85833 LGTM (-2 failures in user32:scroll for both bots)

co-authored by Doug-Lyons
2023-02-12 00:35:27 +01:00
Joachim Henze 09dde2cff9
[REACTOS] "http://www.reactos" -> "https://reactos" (#5043)
To harmonize, to save some bytes, and last but not least for security reasons.
This can be understood as an addendum to (#2619).
2023-02-06 17:01:52 +03:00
Katayama Hirofumi MZ ea55101aad
[NTUSER] Allow Window Snap to be disabled (#5014)
- Add IntIsWindowSnapEnabled helper function that reads registry value WindowArrangementActive.
- Check the registry and store the value to newly-added g_bWindowSnapEnabled global variable on startup.
- Check the global variable before Window Snap.

Win+Left, Win+Right, Win+Up, and Win+Down can be disabled by registry value WindowArrangementActive.
Snapping mouse can be also disabled. CORE-16379
2023-02-01 18:13:32 +09:00
Julen Urizar Compains 8866b9d7b0 Update win32ss/user/ntuser/winpos.c
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2023-01-31 01:08:45 +01:00
Julen Urizar Compains 7866eb2886 [WIN32SS] Fix winpos hyperlink&images loop rendering (CORE-7652) 2023-01-31 01:08:45 +01:00
Katayama Hirofumi MZ c3644fd4d3
[NTUSER] Move IME window creation code (#5009)
Move the code that creates the default IME window, from IntCreateWindow to co_UserCreateWindowEx, just before sending WM_NCCALCSIZE message.
CORE-18723 CORE-18754 CORE-18773 CORE-18785 CORE-18802 CORE-18803
2023-01-30 12:19:39 +09:00
Katayama Hirofumi MZ d992c07239
[NTUSER] Check IME-like after WNDS_DESTROYED check (#5005)
The guilty commit a2c6af0 enabled the IMM mode. So we have to take care of the default IME windows.
Using IS_WND_IMELIKE against WNDS_DESTROYED window was the cause of BSoD. CORE-18777
2023-01-23 12:22:54 +09:00
Roy Tam 0bab3a1048 [NTUSER][USER32] Set WM_CONTEXTMENU's wParam to the child window's handle
Cherry-picked from 3af8415ca9

CORE-18801
2023-01-22 22:18:11 +03:00
Thamatip Chitpong 74c45e0975
[WIN32K:NTUSER] ValidateHwndNoErr: Fix window handle validation (#4981)
Also check window state. Addendum to 4d48b88b.
2023-01-22 17:44:52 +03:00
Denis Malikov 669b2f4465 [WIN32SS:NTUSER] restore snapped window to normal size by dragging window caption
CORE-15638
2023-01-08 22:49:59 +03:00
Timo Kreuzer abb75b6214 [WIN32K] Add some NULL checks for THREADINFO::rpdesk
rpdesk should probably never be NULL, but it happens in rare circumstances, like csrss being terminated.
2023-01-04 10:32:28 +01:00
Timo Kreuzer e56da4854f [WIN32K] Properly reference owner window 2023-01-04 10:32:28 +01:00
Jose Carlos Jesus f59304098d [SHELL32][USER32] Improve pt-PT translation 2022-12-22 23:18:57 +01:00
Thamatip Chitpong ca9ded7af8
[NTUSER] Fix zombie window created by CTRL+ALT+DEL (#4935)
Based on patch by I_Kill_Bugs. CORE-18258
See also commit 58b0558f9.
2022-12-22 01:38:53 +01:00
Katayama Hirofumi MZ 1fbed1710e [NTUSER] Fix SetActiveWindow return value
Apply set-active.patch. CORE-13257
2022-12-04 08:58:34 +09:00
Zebediah Figura 0828e16462
[WINESYNC][USER32] MDI_AugmentFrameMenu(): Use GetSysColorBrush()
Import applicable part of wine-4.7 commit:
8d251a1dd1

Follow-up to 0.4.15-dev-5248-g be014129a5.
2022-11-21 23:08:09 +03:00
Katayama Hirofumi MZ 7cc89e520c [NTUSER] Implement IntCheckImeShowStatusInThread
CORE-11700
2022-11-17 10:27:12 +09:00
Hervé Poussineau 0ecd997bdf [WIN32SS:NTUSER] Extract InitVideo() prototype and gbBaseVideo variable to header 2022-11-15 23:15:26 +01:00
Katayama Hirofumi MZ a2c6af0da4
[BOOTDATA][NTUSER] Add UserIsIMMEnabled and use it (#4882)
This PR enables SRVINFO_IMM32 also for non-CJK. You can disable this flag by setting zero to the LoadIMM registry value if you're non-CJK.
CORE-11700
2022-11-15 17:10:06 +09:00
Joachim Henze 1dd9d2ef37
[NTUSER][USER32] Classic Theme: disabled "checked" checkboxes should be grey (#4874)
Classic Theme: disabled "checked" checkboxes should be grey CORE-18609
and not black, like they erroneously were.
This patch does not seem to have any impact on how they are rendered
for themed ros.

Ftr: We experimented also with COLOR_GRAYTEXT instead of COLOR_BTNSHADOW
but that did result in incorrect drawing of disabled "checked" checkboxes for
the 'High Contrast' Color Schemes.
2022-11-14 00:01:29 +01:00
Stanislav Motylkov 51f78918da
[USER32] Rewrite CharPrev(Ex)A functions and fix tests (#4860)
Fixes 48 failing tests of user32:CharFuncs.
Only 12 minor failing tests are left!

Thanks to Simone Mario Lombardo for the problem analysis!

CORE-18415 CORE-18452
2022-11-13 13:22:26 +03:00
Katayama Hirofumi MZ 6b53f6d824 [USER32] Follow-up of e1f8b32; Delete unnecessary empty line
CORE-11700
2022-11-13 11:50:54 +09:00
Katayama Hirofumi MZ e1f8b32c3d [INCLUDE][USER32] Add WM_FINALDESTROY and improve ImeWndProcA/W
CORE-11700
2022-11-13 09:59:17 +09:00
Katayama Hirofumi MZ c7e8b544bc [USER32] Fix ImeWndProc_common comment
CORE-11700
2022-11-13 08:49:38 +09:00
Katayama Hirofumi MZ 0bc6bd6480
[NTGDI][NTUSER][INCLUDE] Add 'See also:' comments for structures (#4872)
Add 'See also' URLs to some undocumented structures.
2022-11-12 20:27:50 +09:00
Katayama Hirofumi MZ 40863aebc4 [NTUSER] Add 'Win:' comments around IntDefWindowProc 2022-11-10 15:59:52 +09:00
Katayama Hirofumi MZ 0484beb04b
[NTUSER] Don't redraw scrollbar if it is hidden (#4849)
Fix redrawing bug on Command Prompt. CORE-18593
2022-11-10 13:12:20 +09:00
Tony Lambregts 05d2935eed
[USER32] Fix bug in CharPrevExA().
Import Wine commit wine-20050111-258-gffc17dbe0d0:
ffc17dbe0d

Fixes 20 failing tests of user32:CharFuncs.

CORE-18415 CORE-18452
2022-11-07 20:36:06 +03:00
Stanislav Motylkov 59f0ed43b9
[USER32] Coding style fixes only 2022-11-07 20:30:02 +03:00
Thomas Faber 885459d8b4
[WIN32K:NTUSER] Fix parameter check in NtUserGetAsyncKeyState. CORE-18124 2022-10-30 10:46:33 -04:00
Katayama Hirofumi MZ 8f9283398a [NTUSER] Add 'Win:' comment to InitThreadCallback 2022-10-29 14:08:15 +09:00
Katayama Hirofumi MZ 36f7d1a953
[KBSWITCH][CPL:INPUT][NTUSER][EXPLORER] Fix keyboard layout icon (#4815)
Fix keyboard layout icon in taskbar notification area. JIRA issue: CORE-11700, CORE-2699, CORE-18546
- Call ActivateKeyboardLayout to select the keyboard layout correctly.
- Modify WM_INPUTLANGCHANGEREQUEST parameter.
- Modify BroadcastSystemMessageW parameter.
- Revert Taskbar Notification Area MA_NOACTIVATE HACK 8344291 . This fixes Context Menu display.
- Load the "IME File" value and set the IME icon if necessary.
- Correctly implement global hooks.
2022-10-29 07:35:19 +09:00
Katayama Hirofumi MZ 7a8ddbf147
[NTUSER] Support SM_DBCSENABLED and SM_IMMENABLED (#4806)
- Don't set SRVINFO_CICERO_ENABLED flag because we don't have Cicero support.
- Improve UserGetSystemMetrics for SM_DBCSENABLED and SM_IMMENABLED.
- Delete useless UserIsDBCSEnabled function.
CORE-11700
2022-10-27 21:53:58 +09:00
Jose Carlos Jesus 9701bbcf6d
[NTUSER] Fix issue when cursor/caret is static
Also remove the check that Windows doesn't do.

CORE-17929
2022-10-25 23:54:31 +03:00
Katayama Hirofumi MZ 67d8ffb60b [USER32] Fix UpdatePerUserImmEnabling tracing bug
CORE-11700
2022-10-23 13:02:37 +09:00
Katayama Hirofumi MZ 39fe905efa
[NTUSER] Improve IntSetImeHotKey (#4789)
- Use the LOWORD value for VK_PACKET detection.
- IntGetImeHotKeyByKeyAndLang accepts the neutral language identifier (that is zero).
CORE-11700
2022-10-20 02:57:47 +09:00
Katayama Hirofumi MZ 774c3b3c92 [USER32] CliGetPreloadKeyboardLayouts: Use _ultow
CORE-11700
2022-10-19 17:52:31 +09:00
Katayama Hirofumi MZ 7523bf84a5 [USER32] Fix build; Appendum to 21feb52
CORE-11700
2022-10-19 17:40:40 +09:00
Katayama Hirofumi MZ 21feb529fe [USER32] Improve CliGetPreloadKeyboardLayouts
CORE-11700
2022-10-19 17:36:04 +09:00
Katayama Hirofumi MZ 10acb335fa [USER32] Improve CliGetImeHotKeysFromRegistry
CORE-11700
2022-10-19 17:03:54 +09:00
Katayama Hirofumi MZ dff4579bd6 [NTUSER][USER32][INCLUDE] s/SETIMEHOTKEY_DELETEALL/SETIMEHOTKEY_INITIALIZE/
CORE-11700
2022-10-19 12:15:11 +09:00
Katayama Hirofumi MZ ac0a0adc51
[NTUSER][USER32] Improve DrawFrameControl:DFC_MENU and DFC_BUTTON (#4783)
A retrial of 13868ee (#4779).
- Fill the background if necessary, and set the text color and the back mode in DrawFrameControl:DFC_MENU.
- Use UITOOLS95_DrawFrameMenu in menu drawing instead of DrawFrameControl.
CORE-18515, CORE-18417
2022-10-17 13:28:56 +09:00
Katayama Hirofumi MZ 227e596f68
Revert "[USER32][NTUSER] Fill by white in DrawFrameControl:DFC_MENU (#4779)" (#4784)
This reverts commit 13868ee0e8.
CORE-18515
2022-10-16 00:18:50 +09:00
Katayama Hirofumi MZ 13868ee0e8
[USER32][NTUSER] Fill by white in DrawFrameControl:DFC_MENU (#4779)
DrawFrameControl:DFC_MENU draws the monochrome image of menu arrow or checkmark. However, the function didn't draw the entire rectangle correctly when the rectangle was not a square. CORE-18417
2022-10-15 21:00:13 +09:00
Katayama Hirofumi MZ bbef618032 [KBSWITCH][IMM32][USER32] Consider keyboard layout corner cases
Considering invalid Keyboard Layout registry entries.
CORE-11700
2022-10-13 16:01:02 +09:00
Jose Carlos Jesus a3eda784a5
[COMCTL32] Don't hardcode dwCaretWidth parameter while calling CreateCaret
Also replace 0 with NULL for the second argument of the function call.

CORE-18151
2022-10-12 22:12:19 +03:00
Jose Carlos Jesus 9789e9c409
[COMCTL32] Read caret width from registry
Add caret width value to EDITSTATE structure.
To keep the same behavior as Windows Server 2003,
we need to update dwCaretWidth when EDIT_WM_SetFocus is called.

CORE-18151
2022-10-12 22:12:19 +03:00
Jose Carlos Jesus d794996217
[NTUSER] Call SpiSetDWord when processing SPI_SETCARETWIDTH message
This corresponds to REG_DWORD type of CaretWidth value.

CORE-18151
2022-10-12 22:12:12 +03:00
Hermès Bélusca-Maïto 58740bfbc1
[GDI32][USER32] Order the set_module_type arguments the usual way ("UNICODE" before the entrypoint).
+ Harmonize the entrypoints as well.
2022-10-06 15:37:23 +02:00
Katayama Hirofumi MZ 826bd41d88
[NTUSER][USER32] Initial support of WS_EX_NOACTIVATE flag (#4731)
WS_EX_NOACTIVATE flag forbids the window to be activated. CORE-18417
2022-10-04 09:40:43 +09:00
Doug Lyons bd027c9de4
[NTUSER] Fix 'Trying to link windows to itself' (#4478) CORE-18132
Fix 'Trying to link windows to itself' on DestroyWindow. Patch by I_Kill_Bugs.
This fixes a potential BSOD 0x50 observable in the app Localizer Editor"
2022-10-04 00:26:02 +02:00
Katayama Hirofumi MZ 2469ce2c31
[NTUSER][KBSWITCH] Realize Alt+Shift keyboard switch (retry) (#4721)
Alt+Shift is a useful key combination to switch the current keyboard layout. CORE-11737
- Add ID_NEXTLAYOUT command to kbswitch.
- Send command ID_NEXTLAYOUT to kbswitch on Alt+Shift key combination in WM_SYSKEYDOWN handling of IntDefWindowProc function.
- Make IntFindWindow a non-static function.
2022-09-26 08:07:50 +09:00
Katayama Hirofumi MZ f79e80c520 [USER32][IMM32] Use wcscspn instead of wcsspn
b4575ec and db00a75 were my mistakes.
CORE-11700
2022-09-23 13:50:24 +09:00
Katayama Hirofumi MZ 75116d6b87 [USER32] Avoid szImeFileName buffer overrun
CORE-11700
2022-09-16 18:04:55 +09:00
Katayama Hirofumi MZ b4575eccd7 [USER32] Don't allow invalid 'IME File' values
Improve security. CORE-11700
2022-09-16 18:01:19 +09:00
Katayama Hirofumi MZ 8a48446d11 [NTUSER] Use IS_CICERO_MODE() macro in co_UserActivateKeyboardLayout
CORE-11700
2022-09-16 17:41:12 +09:00
Katayama Hirofumi MZ 596f04be6b
[USER32][INPUT] Support various keyboard layouts (#4666)
- Fix IntLoadKeyboardLayout function to return the correct HKL value.
- Modify LAYOUT_LIST_NODE structure to add more information.
- Fix LayoutList_GetByHkl function to choose the IME HKLs correctly.
- Ignore DELETED entries correctly.
- Improve UI/UX.
CORE-11700, CORE-13244, CORE-18364
2022-09-16 08:09:37 +09:00
Katayama Hirofumi MZ 8e110335e7
[USER32] Load keyboard layouts on logon correctly (#4686)
- Add IntLoadPreloadKeyboardLayouts helper function to load the layouts on log-on.
- In UpdatePerUserSystemParameters function, call CliImmInitializeHotKeys and IntLoadPreloadKeyboardLayouts functions.
CORE-16600
2022-09-14 02:58:28 +09:00
Katayama Hirofumi MZ b76602ff22 [NTUSER] Fix UserSetDefaultInputLang by using reordering
- Move IntReorderKeyboardLayouts function.
- Fix UserSetDefaultInputLang function.
CORE-11700
2022-09-13 14:32:39 +09:00
Katayama Hirofumi MZ 5bd03d8b97 [NTUSER] Implement IntReorderKeyboardLayouts
This function is provided for KLF_REORDER flag.
CORE-11700
2022-09-08 11:00:04 +09:00
Katayama Hirofumi MZ 5b87c95e23 [IMM32] s/Imm32IsCiceroMode/IS_CICERO_MODE/
CORE-11700
2022-09-08 09:40:50 +09:00
Katayama Hirofumi MZ 85e292d58f
[NTUSER][USER32][IMM32] Initialize pKL->piiex by using ImmLoadLayout (#4645)
To recognize IME, we have to initialize pKL->piiex.
- Add co_ClientImmLoadLayout and User32CallImmLoadLayoutFromKernel functions to call imm32!ImmLoadLayout on user mode from kernel.
- Use co_ClientImmLoadLayout in NtUserLoadKeyboardLayoutEx.
- Improve Imm32LoadIME to sanitize the IME table.
CORE-11700
2022-09-05 08:34:00 +09:00
Katayama Hirofumi MZ facc2837a1
[NTUSER] Move TL structure definition to ntuser.h (#4644)
- Move struct _TL and TL definitions from win32.h to ntuser.h.
- Modify the type of TL.pfnFree as newly-defined TL_FN_FREE function pointer.
CORE-11700
2022-08-30 09:35:27 +09:00
Katayama Hirofumi MZ 8222c0e6d8 [KBSWITCH][NTUSER] Revert Shift+Alt handling
The current Shift+Alt handling is buggy. The keyboard won't work frequently.
It dislikes system-side Alt (VK_MENU) key handling.
It seems like Shift+Alt handling should be in kernel.
CORE-10667
2022-08-28 20:15:33 +09:00
Katayama Hirofumi MZ 6970b545af [USER32] Follow-up of "Follow-up of 2ba41ad"
You are careless. Do test.
CORE-18338
2022-08-28 16:20:40 +09:00
Katayama Hirofumi MZ 8edc22a2ca [USER32] Follow-up of 2ba41ad
Be careful about every case.
CORE-18338
2022-08-28 16:17:58 +09:00
Katayama Hirofumi MZ 2ba41ad4e0 [USER32] Retry: Fix build against 0aa9d9f and 1d10671
CORE-18338
2022-08-28 16:12:55 +09:00
Katayama Hirofumi MZ 1d106717bf [USER32] Fix build against 0aa9d9f (uninitalized variable hKey)
2022-08-28T00:37:16.2978407Z d:\a\reactos\reactos\src\win32ss\user\user32\windows\input.c(671) : error C4700: uninitialized local variable 'hKey' used

CORE-18338
2022-08-28 16:06:21 +09:00
Katayama Hirofumi MZ 0aa9d9fdb7 [USER32] Fix HKL keyboard list values (Retrial)
CORE-18338
2022-08-28 09:08:12 +09:00
Katayama Hirofumi MZ 5d123ce5f1
Revert "[USER32] Fix HKL value in IntLoadKeyboardLayout (#4632)" (#4637)
This reverts commit ea2d32b9eb.
2022-08-28 08:11:01 +09:00
Katayama Hirofumi MZ ea2d32b9eb
[USER32] Fix HKL value in IntLoadKeyboardLayout (#4632)
The loaded HKL values were wrong. CORE-11700
2022-08-27 07:42:37 +09:00
Katayama Hirofumi MZ c7ba53e3fb [NTUSER] Follow-up of 9e7c2ba
CORE-11700
2022-08-25 12:07:32 +09:00
Katayama Hirofumi MZ 9e7c2ba460 [NTUSER] Improve NtUserGetImeInfoEx / NtUserSetImeInfoEx
CORE-11700
2022-08-25 10:20:42 +09:00
Katayama Hirofumi MZ 7151c30079
[USER32] Get/SetWindowLongPtr about PIMEUI (#4625)
In ImeWndProc_common, correctly get/set the PIMEUI value by Get/SetWindowLongPtrW. CORE-11700
2022-08-24 11:10:23 +09:00
Katayama Hirofumi MZ b4f73f040f
[KBSWITCH][NTUSER] Realize Shift+Alt language switch (#4622)
- Fix co_UserProcessHotKeys on modifiers-only hot-keys.
- Add Alt+Shift hot-keys to kbswitch window.
CORE-11737
2022-08-24 07:31:46 +09:00
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