Commit graph

471 commits

Author SHA1 Message Date
Katayama Hirofumi MZ a541a468ba
[NTGDI][FREETYPE] Unload font engine on system shut-down (#6955)
Check system integrity by explicitly
releasing the font engine.
JIRA issue: CORE-9616
- Use RTL_STATIC_LIST_HEAD against
  g_FontListHead and
  g_FontCacheListHead variables and
  omit initialization of them.
- Implement FreeFontSupport function.
- Call FreeFontSupport in win32k!
  DriverUnload function.
- Fix some usages of
  CONTAINING_RECORD macro.
2024-05-29 09:41:39 +09:00
Katayama Hirofumi MZ 817f89466d
[BOOTDATA][IMM32][NTUSER] Follow-up to #6961 (#6962)
JIRA issue: CORE-19320
- Delete "(brain-dead)".
- Fix "despite of" as "despite".
- Use "%S" instead of debugstr_w.
2024-05-29 01:14:52 +09:00
Katayama Hirofumi MZ c8a3c919e5 [BOOTDATA][IMM32][NTUSER] Set "LoadIMM" to zero
We set "LoadIMM" to zero in order to disable Cicero.
The name of "LoadIMM" is a brain-dead name. This name
means Cicero despite of its name (brain-dead).
They use a human-confusing name intentionally.

JIRA issue: CORE-19320

- Set HKLM\SOFTWARE\Microsoft\Windows NT\
  CurrentVersion\IMM:LoadIMM to 0.
- Add warning comments to the brain-dead name "LoadIMM".
2024-05-28 23:17:22 +09:00
Katayama Hirofumi MZ 4225717dc9 [IMM32][NTUSER] Fix NtUserGetThreadState call of Imm32InquireIme
There was a mistake of parameter value for NtUserGetThreadState
call in Imm32InquireIme function. This affected the logon process.

JIRA issue: CORE-19320

- Replace THREADSTATE_ISWINLOGON2 with THREADSTATE_ISWINLOGON in
  NtUserGetThreadState call in Imm32InquireIme function.
- Rename THREADSTATE_ISWINLOGON2 as THREADSTATE_UNKNOWN_0x10.
- Adapt NtUserGetThreadState to this change.
2024-05-28 23:17:22 +09:00
Doug Lyons 6338913f26
[NTUSER] menu.c position fix to not obscure 'Close' (#6923)
CORE-19579

When IS_SYSTEM_MENU was redefined in https://github.com/reactos/reactos/commit/3ae0ccdcc,
this broke the logic here. So now we restore the correctly working logic.
2024-05-24 19:15:07 -05:00
Doug Lyons cf9f7548d5
[NTUSER] Fix double click on title bar icon not closing window (#6697)
Patch by @I_Kill_Bugs

* [NTUSER] Fix double click on title bar icon not closing window

Improve MENU_TrackMenu handling.

Guilty commit:0.4.15-dev-7750-gc17a654 c17a6542ac

CORE-19492
2024-05-07 09:52:57 -05:00
Doug Lyons 0c0062ac9a
[NTUSER] Fix Skype and other programs installer windows not able to be moved with mouse by clicking on title bar (#6819)
Patch by @I_Kill_Bugs

Add condition into msgqueue along with filter testing to reject messages that are "NotForUs".
Also, do not set AcceptMessage to FALSE, but just keep msgDblClk and idSysPeek values and continue.

CORE-19487
CORE-19538
2024-05-07 09:10:11 -05:00
Timo Kreuzer e8e770fd14 [WIN32K:NTUSER] Fix NULL pointer dereference in MENU_HideSubPopups
Fixes CORE-19367.
2024-05-06 15:47:30 +02:00
Doug Lyons 29235147e2
[NTUSER] Remove some extra repaints/redraws (#6827)
Reposition logic and add Flags testing for RgnType == NULLREGION.
This was suggested by @HBelusca and approved by @I_Kill_Bugs
2024-05-04 07:35:53 -05:00
Doug Lyons 515f998f0d
[NTUSER] Fix co_IntSetParent when calling on itself (#6365)
* Patch by @I_Kill_Bugs.

* Provide explanation for change.
CORE-9386
2024-05-02 03:43:41 -05:00
Thamatip Chitpong 018264f38f
[NTUSER] Release modifier keys when deactivating message queue (#6754)
CORE-14768
2024-04-26 07:12:02 +07:00
Serge Gautherie fd331f1494 [NTUSER] UserSetCursorPos(): Use an early return
Addendum to 76290a6 (0.4.15-dev-7889).
2024-04-20 13:57:35 -06:00
Doug Lyons 76290a6696
[NTUSER] Avoid sending superfluous WM_MOUSEMOVE messages (#6397)
Add a check so that mouse move messages are not generated unless
the mouse cursor X or Y position is changed.

This fixes extra mouse moves generated when clicking.
Patch by I_Kill_Bugs.

CORE-8394 CORE-18529 CORE-19422 CORE-19423
2024-04-12 23:58:52 +03:00
Doug Lyons f132020d8b
[NTUSER] Fix sticky mouse buttons (#6426)
Fix Mouse Buttons Sticking Down causing unexpected window dragging.
This is a patch supplied by @I_Kill_Bugs and seems to work well as tested by @julenuri.

JIRA issue: CORE-11775 'GIMP 2.6.12: Sticky issue when dragging with the mouse'
JIRA issue: CORE-14998 'Google Chrome 40.0.2214.115, when moving window position by dragging at the titlebar, the drag-end is not detected, the window may stick with the mouse pointer'
Improves JIRA issue: CORE-18511

Proposed changes
Add extra code into nonclient.c procedure DefWndDoSizeMove to drop tracking.
If we get a mouse move with the mouse left button down, then break out of testing.
2024-03-13 07:16:02 +01:00
Doug Lyons c17a6542ac
[NTUSER] Fix PeekMessageA for MsgFilterLow/High mouse clicks (#6427)
Fix MSO and Word Viewer not closing when "X" on title bar is clicked.
This is another @I_Kill_Bugs patch.

CORE-14436 , CORE-16985
2024-03-11 14:34:34 +01:00
Katayama Hirofumi MZ c0b4db14de
[BOOTDATA][NTUSER] Prepare for CTF IME Part 1 (#6524)
Supporting TIPs...
JIRA issue: CORE-19360
- Add "IME File" registry value
  as "msctfime.ime" at
  HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM.
- Modify UserIsCiceroEnabled
  function for preparation of
  CTF IME.
2024-02-24 01:53:16 +09:00
Katayama Hirofumi MZ 3768f0893d
[WIN32SS] Fix const-ness of registry helper functions (#6525)
Improve code quality.
JIRA issue: CORE-19360
- Fix const-ness of the arguments
  of win32k registry helper functions.
- Compact UserIsIMMEnabled function.
2024-02-23 21:26:12 +09:00
Katayama Hirofumi MZ 398201dca4
[NTUSER] Relax condition for IntImmProcessKey (#6500)
* [NTUSER] Loose condition for IntImmProcessKey

* key up

* improve

* improve 2

* improve 3
2024-02-16 21:31:13 +09:00
Katayama Hirofumi MZ 8ea93d2ab2
[REACTOS] Standardize <imm.h> and <immdev.h> (#6493)
Improve header compatibility and
code quality.
JIRA issue: CORE-19268
- Improve <imm.h> and <immdev.h>
  compatibility by correctly choosing
  the items.
- Use <immdev.h> instead of
  <ddk/immdev.h>.
- Move INPUTCONTEXTDX, IMEINFOEX,
  IMEDPI, and CLIENTIMC into
  <imm32_undoc.h>.
- Adapt to these changes.
2024-02-13 20:33:14 +09:00
Katayama Hirofumi MZ 9a9b22aac1
[NTUSER] Check class name existence on IntGetAtomFromStringOrAtom (#6184)
Based on I_Kill_Bugs' class_error.patch.
JIRA issue: CORE-13422, CORE-7531, CORE-18639
2024-01-10 08:01:37 +09:00
Thamatip Chitpong 90ed686209
[NTUSER] Use UserHMGetHandle macro (#6244)
Use UserHMGetHandle macro everywhere instead of obj->head.h for consistency.
2024-01-05 07:16:44 +07:00
Thamatip Chitpong f74a2aac8c
[NTUSER] Add UserHMSetHandle macro (#6164) 2023-12-24 23:42:15 +07:00
Thamatip Chitpong 986809c719
[NTUSER] menu.c: Fix readability after commit 1df52257
Add comments for default return value.
2023-12-22 00:22:07 +07:00
Thamatip Chitpong 979551e33e
[NTUSER] accelerator.c: Fix readability after commit 95657698
Add comments for default return value.
2023-12-22 00:01:02 +07:00
Thamatip Chitpong 26f8b97886
[NTUSER] window.c: Fix readability after commit 3f5fd1d0
Add comments for default return value.
2023-12-21 23:49:03 +07:00
Thamatip Chitpong 533d877aaf
[NTUSER] Remove RETURN() macro (#6194)
Remove macro definition and the remaining uses.
RETURN() macro is just a wrapper for goto, most of the time it makes the code more complicated than using goto directly.
2023-12-21 11:10:46 +07:00
Thamatip Chitpong 1df5225708
[NTUSER] menu.c: Don't use RETURN() macro (#6185)
Also remove parentheses around return value.
2023-12-18 12:04:57 +07:00
Thamatip Chitpong 95657698e7
[NTUSER] accelerator.c: Don't use RETURN() macro (#6166) 2023-12-17 17:22:58 +07:00
Thamatip Chitpong 3f5fd1d09e
[NTUSER] window.c: Don't use RETURN() macro (#6150) 2023-12-14 14:36:38 +00:00
Katayama Hirofumi MZ 0bfa0cd0d2
[NTGDI] Fix PatBlt with negative values (#6038)
When I am implementing the IME soft keyboard (#6021 and #6036),
I noticed an issue with PatBlt function.

- Fix the rectangle coordinates when the value was
  negative in NtGdiPatBlt function.
- Fix NC_DrawFrame function.
- Fix UserDrawWindowFrame function.

CORE-19334
2023-11-26 11:46:42 +09:00
Timo Kreuzer 83e1193fb2 [WIN32K] Fix alignment checks in NtUserSetInformationThread
Fixes random failures on x64.
2023-11-10 19:42:13 +02:00
Egor Ananyin 64997887eb
[NTUSER] Fix system menu mouse handing (#5822)
Add a check for the system menu opened from the app icon.
Fixes CORE-19258
2023-11-01 23:11:46 +00:00
Katayama Hirofumi MZ 25b7447818
[SETUPLIB][NTUSER] Toggle input language/layout on Alt+Shift / Ctrl+Shift (#5839)
- Respect the toggle key settings.
- Change the hot key settings in 
  base/setup/lib/mui.c.
- Revert IntDefWindowProc function about
  Alt+Shift handling.
- Delete some code in
  co_IntProcessKeyboardMessage for Alt+Shift
  handling.
- Add IntGetNextKL, IntLanguageToggle, and
  IntCheckLanguageToggle helper functions.
- Modify ProcessKeyEvent and
  UserGetLanguageToggle functions to
  support [Left Alt]+Shift and Ctrl+Shift.
- Improve WM_INPUTLANGCHANGEREQUEST
  handling.
- Message handling shouldn't access kbswitch
  directly.
CORE-10667
2023-10-31 22:37:49 +09:00
Katayama Hirofumi MZ ad12c6cdea
[NTUSER] Disable SC_MOVE if WS_MAXIMIZE or WS_MINIMIZE (#5855)
Based on KRosUser's scmove.patch.
- Check also WS_MINIMIZE window style to
  determine to disable SC_MOVE system command.
CORE-19272
2023-10-31 06:50:00 +09:00
Egor Ananyin e2d3aa7f4a
[NTUSER] Remove a wrong check in MENU_MouseMove (#5736)
This check doesn't seem to be correct in modern ReactOS. Furthermore, it
actually hadn't been working for a long time until it was uncovered by
the recent system menu changes.

Reverts a hack introduced in 17a315285 (r72517), fixes CORE-19170.
The initial bug described in CORE-2338 is not observed.
2023-10-16 19:10:52 +03:00
Timo Kreuzer 4661bc006d [WIN32K] Prevent dereferencing NULL pointer
Initialize a window's ThreadListEntry as an empty list on creation and only remove the window from the list on destruction, when the entry is not an empty list. Previously the window creation could fail before the list entry was initialized and the window would get destroyed after that, resulting in a NULL pointer dereference.
2023-09-21 23:45:31 +03:00
Timo Kreuzer 8650eac76c [WIN32K] Do not try to free a unicode string that is an int-resource 2023-09-17 10:40:19 +03:00
Katayama Hirofumi MZ bcd916bd4e
[NTUSER] Error of co_UserCreateWindowEx should display class name (#5682)
The error messsage of co_UserCreateWindowEx
was unfriendly to the debugger.
Show the window class name by using "%wZ" in
co_UserCreateWindowEx.
2023-09-12 06:16:05 +09:00
Thomas Faber f9212e4a72
[WIN32K:NTUSER] Avoid TOCTOU in ProbeAndCaptureUnicodeStringOrAtom. 2023-09-09 17:50:49 -04:00
Julio Carchi 4976fba59e
[NTUSER] Reduce debug logging spam (#5661)
Silence two of the most debug log spammers in co_MsqSendMessage()
and in co_IntProcessMouseMessage() by demoting ERR to WARN.
2023-09-09 22:28:19 +03:00
Egor Ananyin 3ae0ccdccb [NTUSER] Set correct lParam for WM_(UN)INITMENUPOPUP (#5573)
This is needed to allow apps to detect whether the opened menu is
a system menu or a user menu. CORE-19061
2023-08-24 16:33:03 +02:00
Andriy Shevchenko 2ea03b5b22
[REACTOS] Fix typos in comments (#5591)
Fixing typos in code comments enhances code readability and comprehension for developers and collaborators.
2023-08-22 16:20:29 +03:00
Joachim Henze 49dbc8fbbb [NTUSER] Whitspace-fixes winpos.c
I just can't stand that whitespace-diff at those 2 if-conditions any longer,
which was introduced into co_WinPosSetWindowPos() by
0.4.13-dev-8-g cfdf36e442
Everytime I port something back, I don't know where to put that diff temporarily.
And I don't want to make the older branches worse as well.
So finally squeeze it out at right-hand-side in master head.
2023-08-20 01:41:28 +02:00
Serge Gautherie 728d5736d9
[NTUSER][USER32] Remove 4 remnant defines (#5572)
IS_SYSTEM_MENU():
"moved" to ntuser on 6dfa71c (r68904).

IS_SYSTEM_POPUP():
uselessly added on 6fc29cc (r8195).

IS_BITMAP_ITEM():
uses removed on 07b6ddc (r23221).
uselessly copied to ntuser on 6dfa71c (r68904).
2023-08-15 18:13:27 +02:00
Carl J. Bialorucki c64103d55f
[NTUSER] Fix SPI_SETFONTSMOOTHING behavior (#5526)
CORE-19092

Fixes the behavior of the SPI_SETFONTSMOOTHING system parameter. This also
fixes a bug when trying to select "Use the following method to smooth edges
of screen fonts" in desk.cpl.

Instead of checking if uiParam is equal to two, treat uiParam as a Boolean
that sets font smoothing on or off. This is the correct behavior according
to Microsoft documentation.
Use SpiStoreSzInt method instead of SpiStoreSz to store the value in the registry.
2023-08-10 17:10:51 +02:00
Andrew Dent 72ea2d4c26
[REACTOS] Spelling fixes (#5534)
Fix spellings / hyphenation: `unassociate` ; `read-only` ; `double-click`
2023-08-09 11:48:07 +02:00
Joachim Henze 6b7efb331c [NTUSER] co_IntSendMessageWithCallBack: Formatting only, no functional changes
e.g. wrong indentation.
Want to port something back here, and the slight tweaking allows master to remain
in sync with previous releases.
2023-07-30 21:39:10 +02:00
Jérôme Gardou 1599d7b794 [NTUSER] Always reference a window when using it as parent/child etc.
CORE-18811
2023-07-24 23:29:38 +02:00
Thamatip Chitpong c7e4c3a8e9
[NTUSER] NtUserWaitForInputIdle: Fix unhandled exception BSOD 0x1E (#5391)
Fix CLIENTINFO usermode pointer access once again.
Based on a patch by Michael Fritscher from CORE-10017.
Addendum to 7052282507 (r68702).

CORE-18728 CORE-19014
2023-07-02 20:30:30 +03:00
Serge Gautherie 38560761ce
[WIN32K:NTUSER] Add ASSERT() on "linking window to itself" (#4749)
Addendum to ee0511b (0.4.10-dev-323).
CORE-18132
2023-07-02 13:19:06 +02:00