Commit Graph

1332 Commits

Author SHA1 Message Date
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
Doug Lyons 116c0cd9a5
[USER32] Fix resource display of MSVC BI_BITFIELD 32-bit bitmaps. (#5942)
This specifically fixes Wordpad's Open and SaveAs dialog toolbars.

* Fix 16 bpp BI_BITFIELDS like 32 bpp was done.
* Add BI_BITFIELDS byte count into bitmap_info_size return value.
* Account for GCC's windres.exe incorrect omission for BI_BITFIELDS DWORD's when processing 32-bpp bitmaps.
* Account for GCC's windres.exe failing with bitmaps with BI_BITFIELDS and bits per plane is 16
* Fix WARN message to show error on either 16-bpp or 32-bpp
* Correct comment regarding GCC compiled bitmaps with compression of BI_BITFIELD's to add 16 bits per plane

CORE-17005
2024-04-27 14:38:06 -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
Justin Miller 2a2556c5d0
[WIN32SS] Introduce the NATIVE_REACTX define and disable some Dx calls (#6025)
The code itself isn't wrong but we're entirely missing the logic needed
to make it work. This leads to spontaneous crashes with video drivers and
various unity games.
2024-04-17 21:47:49 -07: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
Katayama Hirofumi MZ de5c472033
[WIN32SS][USER32] Refactor USER32 callbacks (#6619)
Refactoring kernel-to-USER32 callback code.
Localize USER32 callback entry definitions.
JIRA issue: N/A
- Add header file win32ss/include/u32cb.h and use it to define the
  USER32 callback entries.
2024-03-20 09:45:04 +09: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 afd39cbc06
[USER32] Show Debug Log Message when unhandled PNG found in ICO file. (#5566)
Detect the PNG data in ICO files and print an appropriate message to the debug log.
JIRA issue: CORE-19107
2024-03-12 16:45:22 +09: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
Hermès Bélusca-Maïto 3a49e26f13
[KERNEL32][PSDK][NTVDM][CONSRV] Use now-documented ReadConsoleInputEx() flag names.
Addendum to commit b8b8819c7 (r60920)

ReadConsoleInputEx() and its flags used to be undocumented.
In the meantime they became documented on MSDN, see:
https://learn.microsoft.com/en-us/windows/console/readconsoleinputex

We can therefore adopt these now-documented flag names.
2024-03-06 12:28:27 +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
Hermès Bélusca-Maïto 59f8611321
[WINSRV] Delay-load psapi.dll
Note that it is used only in debug builds in order to display the list
of processes being terminated in the debug log.
2024-02-22 22:41:06 +01:00
Hermès Bélusca-Maïto 2c0af91ba1
[WINSRV] Use ARRAYSIZE() instead of hardcoding buffer size in GetProcessImageFileNameW call 2024-02-22 22:41:05 +01: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
Doug Lyons fb43301bad
Fix Cursor Position in "...file name:" box when opening from Explorer 'Search' toolbar (#6333)
Original patch by @I_Kill_Bugs.
Fix Cursor being in middle of '...file name:' edit box when using 'Search' from the Explorer toolbar.

JIRA issue: CORE-19407
2024-01-17 07:42:18 -08: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
Whindmar Saksit 7c2e8c67f1
[CONSRV] Don't blink cursor if the console window is not active (#5601)
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2024-01-08 13:49:28 +01: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
Katayama Hirofumi MZ 90432c1a4c
[COMCTL32][USER32] EDIT & ListView & TreeView: Fix HRGN leaks (#6268)
Based on KRosUser's memleak_comctl32.patch.
JIRA issue: CORE-19405
Fix HRGN handle leaks.
2024-01-04 18:05:39 +09:00
Katayama Hirofumi MZ b59bf8a3f4
[COMCTL32][USER32] ComboBox: Don't close listbox on letter type (#6227)
Based on KRosUser's combo_v3.patch.
JIRA issue: CORE-16376
- Set CBF_NOROLLUP flag on (WM_CHAR or
  WM_IME_CHAR) and CBF_DROPPED state.
2024-01-03 08:45:24 +09:00
Katayama Hirofumi MZ d6c70f0864
[COMCTL32][USER32] RadioButton: Notify BN_CLICKED on WM_SETFOCUS (#6266)
Based on KRosUser's button_fixnotif.patch.
JIRA issue: CORE-6542, CORE-19384
Notify BN_CLICKED to the parent on WM_SETFOCUS message
handling if the button type was either BS_RADIOBUTTON or
BS_AUTORADIOBUTTON, and if the button was unchecked.
2024-01-01 11:01:59 +09:00
Thamatip Chitpong f74a2aac8c
[NTUSER] Add UserHMSetHandle macro (#6164) 2023-12-24 23:42:15 +07:00
Ratin Gao ffb20d3330
[REACTOS] Fix typos (#6198)
- Adress -> Address
- Currupted -> Corrupted

3rd-party files are not modified.
2023-12-23 21:37:08 +01: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
Katayama Hirofumi MZ 34068456a5
[COMCTL32][USER32] EDIT control: Check bCaptureState on WM_CHAR (#6206)
Based on KRosUser's edit_v2.patch.
Edit control should stop processing
characters when left mouse button
is down.
If es->bCaptureState is set, then
ignore WM_CHAR message.
CORE-10259
2023-12-21 20:24:44 +09: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
Serge Gautherie bf7e7c2383
[WIN32SS:GDI] eng/error.c: Minor code tweaks (#6128)
- Remove a useless debug.h include.
- Use the initialized pTeb pointer.
- Remove a useless else.
- Add a SAL2 annotation.
2023-12-17 22:13:45 +01:00
Whindmar Saksit 82c07abf1a
[USER32] Support loading icons from data file module (#6065)
GetModuleFileName() fails on LOAD_LIBRARY_AS_DATAFILE causing LoadImage to fail.
Use a fake filename for LR_SHARED (with same format as Windows).
This may not be a good design, but it does match Windows' behaviour.

+ Added test.
2023-12-17 22:11:50 +01:00
Thamatip Chitpong 95657698e7
[NTUSER] accelerator.c: Don't use RETURN() macro (#6166) 2023-12-17 17:22:58 +07:00
Katayama Hirofumi MZ d55add359c
[COMCTL32][USER32] Button: Fix DLGC_... handling (#6168)
Based on KRosUser's button.patch.
- Fix DLGC_... handling by using & operator
  in BUTTON_CheckAutoRadioButton
  in button.c.
- Fix DLGC_... handling by using & operator
  in IsDialogMessageW in dialog.c.
- BM_CLICK's wParam must be zero.
CORE-17210
2023-12-16 09:29:13 +09:00
Serge Gautherie ae534e8cee
[USER32] GetNextDlgGroupItem(): Remove WineSync copy-pasta (#6162)
Improve WineSync.
Addendum to 61fb8a2 (r19831).
2023-12-14 14:41:58 +00:00
Thamatip Chitpong 3f5fd1d09e
[NTUSER] window.c: Don't use RETURN() macro (#6150) 2023-12-14 14:36:38 +00:00
Katayama Hirofumi MZ db10ce0f9f
[USER32] Skip STATIC controls on arrow keys (#6142)
- Skip DLGC_STATIC controls on array keys.
- Avoid infinite loop by using hwndFirst variable.
CORE-6127
2023-12-13 07:04:52 +09:00
Katayama Hirofumi MZ 17617221ce
[MSCTFIME][SDK][USER32] Add msctfime.ime (stub) (#6141)
## Overview
1. msctfime.ime is an IME file interface
  for new-style IMEs a.k.a. "Text Input
  Processors" (TIPs).
2. msctfime.ime is loaded as old-style
  IME file at ImmLoadLayout in specific
  condition.
3. msctfime.ime communicates with
  the current TIP (This feature is not
  implemented yet).

## Proposed changes
- Add msctfime module at dll/ime/msctfime.
- The functions in this module are currently
  stub.
- Move IME file interface declarations from
  <imm.h> to <ddk/immdev.h>.
- Modify ImmNotifyIME, NotifyIME, and
  ImeProcessKey prototypes for x64
  compliance.
CORE-19360
2023-12-11 22:37:25 +09:00
Katayama Hirofumi MZ 04b1e8945b
[COMCTL32][USER32] ComboBox: Do default processing on WM_SYSKEYDOWN (#6152)
Based on KRosUser's combo.patch. Enable Alt+F4 on ComboBox.
Do default processing on WM_SYSKEYDOWN if necessary.
CORE-18231
2023-12-11 22:04:18 +09:00
Stanislav Motylkov 51f9b86cbc [REACTOS] Omit "aka" for the authors' nicknames
Based on grep query: https://git.reactos.org/?p=reactos.git&a=search&h=c00d41d91c181746563e689d3390228f703053f5&st=grep&s=+%28aka+
Dedicated to Joachim Henze - PR #5978 commit 4c7222bab3.
2023-12-03 22:08:20 +03:00
Katayama Hirofumi MZ 75cf6920bc
[IMM32][SDK][NTUSER] Implement ImmProcessKey for Cicero (#6106)
Complete CTF IMM.
- Add CtfImeProcessCicHotkey and CtfImeSetActiveContextAlways
  to access CTF IMEs.
- Check whether Cicero is started in the current thread in ImmProcessKey.
- Call CtfImeProcessCicHotkey if necessary in ImmProcessKey.
- Modify <CtfImeTable.h>.
- Add CI_CICERO_STARTED flag to "ntuser.h".
- Fix Imm32JCloseOpen.
CORE-19268
2023-12-03 17:33:22 +09:00
Thamatip Chitpong e0c17c3f46
[DXG] Don't repeat "DXG" module name in version info 2023-12-01 08:23:13 +07:00
Katayama Hirofumi MZ 84e8ea0dd5
[USER32] Fix IsWindow by not using WNDS2_INDESTROY (#6066)
Based on I_Kill_Bugs' IsWinodw.patch.
CORE-11722, CORE-16432
2023-12-01 09:08:58 +09:00
Katayama Hirofumi MZ 931224fbe1
[IMM32][SDK][NTUSER] Implement CtfImmTIMActivate (#6041)
- Add Imm32InitTLS, Imm32AllocateTLS, Imm32GetTLS,
  Imm32GetCoInitCountSkip, Imm32IncCoInitCountSkip, and
  Imm32DecCoInitCountSkip helper functions to
  control the TLS data.
- Introduce "CoInitialize Spy" (ISPY) to manage COM
  initialization status.
- Implement CtfImmCoInitialize and CtfImmCoUninitialize.
- Implement CtfImmEnterCoInitCountSkipMode and
  CtfImmLeaveCoInitCountSkipMode.
- Implement CtfImmLastEnabledWndDestroy,
  ImmDisableTextFrameService, and CtfImmTIMActivate.
CORE-19268
2023-11-30 17:22:50 +09:00
Doug Lyons 75c67f9b51
[USER32] Fix F1'97 Demo icon not showing in explorer (#5268)
Fixes the F1'97 Demo program (a racing game) not showing an icon in explorer.
This fixes a very special kind of icons which are embedded into the
executable by ancient Watcom C/C++ compilers.
Windows XP/2k3sp2 can show that icon.
Windows Vista/7 cannot show that icon.

Due to the different behavior of the various Windows versions, we
also added a testcase for our bots to protect that functionality in the future,
we committed that test by 0.4.15-dev-7076-g c00d41d91c (#6020)

JIRA issue: CORE-10726
2023-11-27 17:02:08 +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
Katayama Hirofumi MZ 3b2fdc56bd
[IMM32][SDK][NTUSER][IMM32_WINETEST] Add CtfImmGenerateMessage (#6037)
Implementing advanced text service...

- Add CtfImmGenerateMessage function.
- Modify imm32.spec.
- Move TRANSMSG, TRANSMSGLIST etc. in
  win32ss/include/ntuser.h to <immdev.h>.
- Move win32ss/include/imetable.h to
  sdk/include/reactos/imetable.h.
- Move dll/win32/imm32/CtfImeTable.h to
  sdk/include/reactos/CtfImeTable.h.
- Fix build failure of imm32_winetest due
  to TRANSMSG redefinition.

CORE-19268
2023-11-25 22:46:00 +09:00
Hermès Bélusca-Maïto c77a5ff99b
Revert my last commits that break build.
Revert "[PSDK][AFD][VGADDI] Further build and MS PSDK compatibility fixes."
This reverts commit 99efc2ae50.

Revert "[PSDK] Sync winresrc.h with wine-8.20"
This reverts commit 3e83562aa7.

Revert "[OSK][PROGMAN] Fix resource file build."
This reverts commit 84e4ad0a82.

Revert "[PSDK] Use the new .rh files in winresrc.h"
This reverts commit f6fb7c48c9.
2023-11-23 17:20:47 +01:00