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
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
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
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
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
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
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
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
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