Commit graph

816 commits

Author SHA1 Message Date
Katayama Hirofumi MZ ef3e27e2c9
[NTUSER] Improve NtUserSetWindowPlacement (#7096)
Splitted from #7082. Correct behavior of
NtUserSetWindowPlacement function.
JIRA issue: N/A
- Check gptiCurrent->dwExpWinVer in
  NtUserSetWindowPlacement function.
- Fix the last error.
2024-07-09 07:42:56 +09:00
Katayama Hirofumi MZ 6c74e69d12
[NTUSER][USER32] Populate dwExpWinVer (#7095)
This value is needed for
SetWindowPlacement and IMM.
JIRA issue: CORE-19675
JIRA issue: CORE-19268
- Add RtlGetExpWinVer function
  into win32ss/user/rtl/image.c.
- Add RtlGetExpWinVer prototype
  into win32ss/include/ntuser.h.
- Delete RtlGetExpWinVer
  definition in
  win32ss/user/user32/windows/window.c.
- Populate THREADINFO.dwExpWinVer
  and CLIENTINFO.dwExpWinVer
  by using RtlGetExpWinVer in
  InitThreadCallback function.
2024-07-09 04:22:14 +09:00
Katayama Hirofumi MZ efe42074cc
[USER32][USER32_APITEST] CopyImage: Check flags (#7075)
JIRA issue: N/A
- Check CopyImage flags.
- If there is any invalid flag, then set ERROR_INVALID_PARAMETER
  and return NULL.
- Add CopyImage testcase.
2024-07-08 19:24:15 +09:00
Katayama Hirofumi MZ 0cfd7bde9b
[USER32] TileWindows: Adjust timeout of QuerySizeFix (#7081)
Since my machine performance
became lower, we have to adjust
timeout to get correct pattern of
user32!TileWindows function.
JIRA issue: CORE-19674
Adjust timeout value in QuerySizeFix
function.
2024-07-07 06:48:36 +09:00
Katayama Hirofumi MZ 80c170d7bc
[IMM32][NTUSER] Reduce a little IMM spams (#7077)
Reduce log spams that @julenuri reported.
JIRA issue: CORE-19268
- Use Imm32IsCrossThreadAccess
  instead of IS_CROSS_THREAD_HIMC in
  ImmSetCompositionWindow function.
- Reduce ERR logging in
  NtUserQueryInputContext function.
2024-07-05 05:07:49 +09:00
Oleg Dubinskiy 1a1025011f
[REACTOS] Fix LoadCursorW() incorrect usage cases (#7053)
Fix wrong MAKEINTRESOURCEW() macro usage cases in LoadCursorW() system-wide.
MSDN documentation for this function states we need to use MAKEINTRESOURCEW() macro only for internal application-defined cursors (loaded from the app instance specified by hInstance parameter), but not for system-defined cursors (those begin with IDC_* prefix), in case when hInstance is NULL.
So get rid from MAKEINTRESOURCEW() macro usage for all cases when hInstance parameter is NULL. And on the contrary, when hInstance is valid and points to the application instance, then use it for the resource identifier.
2024-07-01 18:05:46 +02:00
Doug Lyons cd88a97115
[NTUSER] Fix popup menu positioning for Miranda IM (#6981)
CORE-17838
2024-06-19 18:55:12 -05:00
Gabriele Lo Re ae27ffcddc
[TRANSLATION] Improve Italian (it-IT) translation (#6820)
I have edited some traslation files for the italian language, as the text
looked robotic in the way senteces were written, or in some cases it used
not-really-fitting synonymous or incorrect spelling. The edited strings
are from varius areas of ReactOS. I hope this contribution makes italian
language less strange to native speakers.

- [ACCESS] Improve Italian (it-IT) translation
- [DESK] Improve Italian (it-IT) translation
- [JOY] Improve Italian (it-IT) translation
- [MAIN] Improve Italian (it-IT) translation
- [SYSDM] Improve Italian (it-IT) translation
- [TIMEDATE] Improve Italian (it-IT) translation
- [ACPPAGE] Improve Italian (it-IT) translation
- [DESKADP] Improve Italian (it-IT) translation
- [DEVCPUX] Add Italian (it-IT) translation
- [FONTEXT] Improve Italian (it-IT) translation
- [ZIPFLDR] Improve Italian (it-IT) translation
- [BROWSEUI] Improve Italian (it-IT) translation
- [USER32] Improve Italian (it-IT) translation
- [CONSRV] Improve Italian (it-IT) translation
- [USERSRV] Improve Italian (it-IT) translation

Reviewed-by: Joachim Henze <joachim.henze@reactos.org>
Reviewed-by: Simone Mario Lombardo <me@simonelombardo.com>
2024-06-10 13:45:00 +03:00
Carl J. Bialorucki ad73e17418
[USER32] Introduce user32_vista and stubplement GetDpiForWindow() (#6208)
Add user32_vista.dll to introduce new NT6+ User32 features without changing the existing User32.dll when compiled as NT5.x. Also implements a stub for GetDpiForWindow(). The GetDpiForWindow() function will be required to Wine-sync common controls to modern Wine versions.

Changes:
Expose GetDpiForWindow() function and USER_DEFAULT_SCREEN_DPI to appropriate versions in winuser.h
Introduce a basic user32_vista library that can be expanded as needed.
2024-06-04 10:19:32 -06:00
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
Andrei Miloiu 3b99e294f5
[USER32] Update Romanian (ro-RO) translation (#6704) 2024-05-10 21:34:05 +02: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
Joachim Henze a69532ec4a [USER32] defwnd.c only formatting, no functional change
For preparing a backport I do slightly improve the formatting:
- for the 2 SetScrollInfo() calls, that I do intend to port back
- fix last place where we had mixed space and tab indentation in this file at the DefWindowProc signatures
- strip some exclamation marks in some dbg-prints
- improve the header
- strip a space at some rather long lines NtUserMessageCall()
2024-05-04 12:30:43 +02: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
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
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
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