Commit graph

1219 commits

Author SHA1 Message Date
Timo Kreuzer 2b8c1b0dac [WIN32K] Fix WindowExtra for some server-side classes
These values are based on apitest results.
2023-05-25 18:56:02 +03:00
Timo Kreuzer 05cd3406e7 [USER32] Fix SetWindowWord/Long
These must use the corresponding NtUserSetWindowWord/Long function and cannot use NtUserSetWindowLongPtr, otherwise the function can fail, when there is only space for a LONG, but not for a LONG_PTR at the specified offset.
2023-05-25 18:56:02 +03:00
Hermès Bélusca-Maïto 44e1d87596
[USER32] RegisterClassExWOWW/ExA: NULL or IS_ATOM class are treated the same. (#5291)
CORE-18978

Fixes NULL pointer access when e.g. class.lpszClassName == NULL and
the class is registered. The RegisterClass(ExA/W/...) should return 0
instead of throwing an invalid access exception.

However, providing an invalid pointer will trigger a crash.
2023-05-21 19:35:19 +02:00
Hermès Bélusca-Maïto f172f98a10
[USER32] Minor formatting and dead-code removal.
Remove dead code CreateSmallIcon from commit e0968c78 (r18764);
see also b243445c (r60592).
2023-05-21 19:28:53 +02:00
Doug Lyons 8a7b5a9009
[SHELL32][USER32] Fix icon regression and one test (#5207) 2023-05-21 11:18:00 +02:00
Katayama Hirofumi MZ d8946e20cb
[NTUSER] Implement THREADSTATE_CHECKCONIME (#5272)
- Add THREADSTATE_CHECKCONIME handling in NtUserGetThreadState function.
CORE-11700
2023-05-10 20:24:21 +09:00
Katayama Hirofumi MZ 4aff629302
[IMM32][NTUSER][SDK] Add ImmCallImeConsoleIME (#5271)
- Add <jpnvkeys.h>.
- Add imm32!ImmCallImeConsoleIME.
CORE-11700
2023-05-10 14:04:01 +09:00
Katayama Hirofumi MZ 2d31b06c67
[NTUSER] Remember old KL for Chinese IMEs (#5266)
The Chinese user uses Ctrl+Space key combination to switch between the IME keyboard and the non-IME keyboard. To enable Ctrl+Space, the system has to remember the previous keyboard layout. In IntImmActivateLayout function, remember the previous keyboard layout (hklPrev) to switch back for Chinese IMEs. CORE-18950
2023-05-05 17:00:05 +09:00
Thamatip Chitpong 560671a784
[NTUSER] Improve MsqPostMessage (#5225)
- MsqPostMessage: Fill Message structure before InsertTailList. For style consistency.
- MsqPostMessage: Fix the use of MessageQueue variable
2023-04-24 20:11:46 +02:00
Hervé Poussineau 49246541de [WIN32SS:ENG] Do not free LDEV if unloading a driver failed
Currently, LDEVOBJ_bUnloadImage always returns FALSE due to missing functionality in ntoskrnl.
LDEVOBJ_vFreeLDEV contains an assert that driver is correctly unloaded before freeing it.
Prevent this assert by calling LDEVOBJ_vFreeLDEV only if LDEVOBJ_bUnloadImage succeed.

This can be easily triggered if DrvEnableDriver function (called in LDEVOBJ_bEnableDriver) fails.
2023-04-16 19:37:05 +02:00
Thamatip Chitpong 77d4653164
[NTUSER] co_UserDestroyWindow: Validate window before destroying it (#5054)
Prevent the window from being destroyed twice
fixes BSOD 0x1E CORE-18821
2023-04-12 22:20:46 +02:00
Katayama Hirofumi MZ 8f2c2c1def [COMCTL32][USER32] EDIT: Fix caret position for IME
CORE-11700
2023-04-10 08:27:50 +09:00
Katayama Hirofumi MZ 5ff0ef403e
[NTUSER] IntImmActivateLayout: Set CI_IMMACTIVATE if not pImeWnd (#5231)
In IntImmActivateLayout function, if pImeWnd was NULL and pti->spDefaultImc was non-NULL, then set CI_IMMACTIVATE flag. CORE-11700
2023-04-09 15:19:47 +09:00
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
hpoussin 1bdefebc9e
Enable framebuf_new driver (#4775)
Replace framebuf display driver by framebuf_new display driver
Compile framebuf_new as framebuf.dll, and add it to bootcd/livecd
Remove old framebuf from compilation, to not conflict
2023-04-02 23:33:15 +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