Commit graph

791 commits

Author SHA1 Message Date
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
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
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 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
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
Hermès Bélusca-Maïto 0c2827a3f3
[USER32] Fix OEM resources compilation due to missing OBM_, OIC_, OCR_ defines...
... addendum to commits 072965eb0 and 6cdaad13b.

Due to the wrapping of these defines within an #ifdef OEMRESOURCE block
in winuser.h (for MS PSDK compatibility), these defines became unavailable
in user32.rc resource file. Thus, during user32 resources compilation,
the resource compiler fell back to the behaviour of considering these
resource IDs as literal string IDs (not numerical ones).

Thus, whenever code was trying to refer to these resources via their
numerical IDs, these resources could not be found now, rendering ReactOS
unusuable.
2023-11-23 11:39:57 +01: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
Joachim Henze e13ebd44c6 [USER32] Pure Whitespace sync from comctl32/combo.c, no functional change
This will make future syncs between those files much easier,
and fixes tons of mixed tab-space-indentation.

Please no whitespace nitpicks when reviewing this commit, it is a SYNC!
2023-09-11 17:57:40 +02:00
Joachim Henze d97313181e [USER32] Sync comctl32 combo.c code in context of CORE-17883 2023-09-11 17:57:40 +02: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