Commit graph

1344 commits

Author SHA1 Message Date
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
Oleg Dubinskiy 96acfcb3dc
[NTGDI] AlphaBlend/TransparentBlt: check whether the source DC is an INFO DC too (#6885)
Improve checks in AlphaBlend and TransparentBlt functions: check whether DCSrc is of DCTYPE_INFO also, to fail in that case properly too.
Spotted by PVS-Studio analysis.
Reference: https://pvs-studio.com/en/blog/posts/cpp/1122/.
2024-05-14 19:08:37 +02: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
Katayama Hirofumi MZ 5a287473fd
[NTGDI][FREETYPE] Initial support of Surrogate Pairs and emojis (#6851)
Support emoji characters and minor characters.
JIRA issue: CORE-19030
NOTE: Not every emoji is supported yet (No ZWJ support). Surrogate pairs only.
NOTE: This feature only works if the appropriate font is selected.
- Add IS_HIGH_SURROGATE and
  IS_LOW_SURROGATE macros.
- Add Utf32FromSurrogatePair helper function
  to convert a surrogate pair to a UTF-32 code
  point.
- Convert the surrogate pairs in the text in
  TextIntGetTextExtentPoint, IntGetTextDisposition,
  and IntExtTextOutW functions.
2024-05-07 15:24:34 +09:00
Katayama Hirofumi MZ d076146f4e
[NTGDI][FREETYPE] Check 'No transformation' for performance (#6850)
Slight performance improvement.
JIRA issue: CORE-15554
- Add bNoTransform variable.
- Check whether mat is identity matrix.
- If so, then don't do FT_Vector_Transform.
2024-05-07 11:14:16 +09:00
Timo Kreuzer e8e770fd14 [WIN32K:NTUSER] Fix NULL pointer dereference in MENU_HideSubPopups
Fixes CORE-19367.
2024-05-06 15:47:30 +02:00
Katayama Hirofumi MZ 521eb0c7c0
[NTGDI][FREETYPE] Increase STACK_TEXT_BUFFER_SIZE (#6847)
Slight performance improvement. STACK_TEXT_BUFFER_SIZE = 100 was too small
for long text. This PR can reduce unnecessary buffer allocations in NtGdiExtTextOutW
function.
JIRA issue: CORE-15554
- Change STACK_TEXT_BUFFER_SIZE to 512.
2024-05-06 20:39:26 +09:00
Katayama Hirofumi MZ 0056313e15
[NTGDI][FREETYPE] Simplify code around bold/italic glyph caches (#6846)
Simplify and reduce font code.
JIRA issue: CORE-15554
- Don't treat bold/italic glyphs specially in font cache.
- Delete useless IntGetBitmapGlyphNoCache function.
2024-05-06 19:17:09 +09: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
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