Commit graph

1436 commits

Author SHA1 Message Date
Katayama Hirofumi MZ
2f23e70ad5
Revert "[NTUSER] Enable SM_CXICON etc. settings from registry (#7679)" (#7682)
This reverts commit 3b3741c10a of #7679 .
It seems like the shell icon size is not the
system icon size.

The wide string L"Shell Small Icon Size" is detected in
shell32.dll and themeui.dll.
No L"Shell Small Icon Size" in win32k.sys found.
JIRA issue: CORE-12905
2025-01-29 21:34:19 +09:00
Katayama Hirofumi MZ
3b3741c10a
[NTUSER] Enable SM_CXICON etc. settings from registry (#7679)
Improve usability.
JIRA issue: CORE-12905
- Add nIconSize and nSmallIconSize
  values to SPIVALUES structure.
- Load "Shell Icon Size" and "Shell
  Small Icon Size" values from registry.
- Enable changing of SM_CXICON,
  SM_CYICON, SM_CXSMICON, and
  SM_CYSMICON settings.
2025-01-29 20:20:25 +09:00
Katayama Hirofumi MZ
fe11f7a2e5
[REACTOS] Refresh old URLs (#7632)
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
  to dead links.
- Use MS Learn links rather
  than MSDN ones.
- Some dead links revived by
  Web Archive.
- Don't change Wine Tests
  and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
2025-01-28 13:36:45 +09:00
Hermès Bélusca-Maïto
dbf784472e
[WIN32SS:NTGDI] FontFamilyFillInfo(): Check returned IntGetOutlineTextMetrics() size...
... before allocating pool memory, as it is done everywhere else in the code.
2025-01-23 23:20:54 +01:00
Hermès Bélusca-Maïto
07ce196d8e
[WIN32SS:NTGDI] Fix build, addendum to commit 9c474c4b7 2025-01-23 22:33:11 +01:00
Hermès Bélusca-Maïto
2e1a4e74a4
[WIN32SS:NTGDI] freetype.c: Fix the ordering of, and add some missing set-last-error calls. 2025-01-23 21:17:15 +01:00
Hermès Bélusca-Maïto
f22efba486
[WIN32SS:NTGDI] freetype.c: Use the correct last-error functions.
EngSetLastError() is for Win32 errors; SetLastNtError() is for NTSTATUS.
2025-01-23 21:03:26 +01:00
Hermès Bélusca-Maïto
c6cd3b242a
[WIN32SS:NTGDI] Improve a DPRINT 2025-01-23 20:51:18 +01:00
Hermès Bélusca-Maïto
9c474c4b73
[WIN32SS:NTGDI] freetype.c: Use debug channel "GdiFont" 2025-01-23 20:25:25 +01:00
Hermès Bélusca-Maïto
e16dc27e47
[WIN32SS:ENG:GDI] bitblt(_new).c: Use correct debug channel "GdiBlt" 2025-01-23 20:23:30 +01:00
Katayama Hirofumi MZ
1868985dde
[FREETYPE][NTGDI] Simplify IntGdiLoadFontsFromMemory (#7651)
Simplify code logic and reduce management cost.
JIRA issue: CORE-19973
- Add IntGdiLoadFontByIndexFromMemory helper function.
- Simplify IntGdiLoadFontsFromMemory function.
2025-01-22 11:56:41 +09:00
Katayama Hirofumi MZ
bb7cf5a5b7
[FREETYPE][FTFD][NTGDI] Split FT_Bitmap_Convert hack (#7628)
Our FT_Bitmap_Convert function had a hack to make the
bitmap image compatible to ReactOS. I think the hack on
FT_Bitmap_Convert should be separated from our font
engine.
JIRA issue: CORE-16047
- Add FT_Bitmap_Convert_ReactOS_Hack function, that is
  based on FT_Bitmap_Convert, and split the hack of
  FT_Bitmap_Convert.
- Use FT_Bitmap_Convert_ReactOS_Hack in
  IntGetBitmapGlyphWithCache function instead of
  FT_Bitmap_Convert.
- Modify ftfd.spec to add 
  FT_Bitmap_Convert_ReactOS_Hack.
2025-01-22 10:57:40 +09:00
Katayama Hirofumi MZ
d4f283b67b
[FREETYPE][NTGDI] Use Face->num_faces instead of ttc_header.count (#7646)
Supporting raster fonts. Using
num_faces is the generic way.
JIRA issue: CORE-16165
- Use FT_FaceRec.num_faces instead
  of TT_Face.ttc_header.count in
  counting the font faces in
  IntGdiLoadFontsFromMemory function.
2025-01-20 22:09:16 +09:00
Katayama Hirofumi MZ
82b7d4f3da
[FREETYPE][NTGDI] Fix ftGdiGetTextMetricsW return for raster fonts (#7635)
Try to get ready to support raster fonts.
JIRA issue: CORE-17327
- Fix the return value of
  ftGdiGetTextMetricsW function
  for raster fonts.
2025-01-18 22:33:00 +09:00
Doug Lyons
b1257cefe1
[NTGDI] Silence some debug log spam from GreGetObjectOwner when input parameter is NULL. (#7606)
CORE-19962
Co-authored-by: Timo Kreuzer <timo.kreuzer@reactos.org>
2025-01-16 19:11:19 -06:00
Doug Lyons
1c55924045
[USER32_APTEST][USER32] CopyImage improve regression test and function. (#7524)
CORE-19806 and CORE-17902.

* Follow-up of PR #6886 and commit d3ec7cd to remove hack.
2024-12-24 17:51:31 -06:00
Hermès Bélusca-Maïto
cc3672cb73
[RESOURCES] Remove redundant #pragma code_page(), includes, etc.
They are redundant when these are already present in the given module's
root resource file, from which the language-specific resource files are
being included.
2024-12-22 18:39:26 +01:00
Timo Kreuzer
2d4c0b87b1 [WIN32K:NTUSER] Check for NULL desktop window in co_IntProcessMouseMessage 2024-12-22 10:19:01 +02:00
Ratin Gao
d936dba7ff [REACTOS] Fix 'seperate' typos 2024-12-11 08:56:06 +02:00
Hermès Bélusca-Maïto
01a10da73d
[VIDEOPRT] VideoPortInitialize(): Display the invalid and expected struct sizes on error 2024-12-09 13:42:44 +01:00
Timo Kreuzer
541cb0d9b2 [USER32] ordinals -> @ 2024-11-24 13:40:11 +02:00
Doug Lyons
3bb1e64408
[NTGDI:FREETYPE] Account for non-breaking spaces in x-dim of IntExtTextOutW (#7479)
CORE-19768
Follow up of PR #7274. This stop WARN's from FF 28 as well.

* Make del and nbsp const's based on reviewer comments.
2024-10-26 16:44:39 -05:00
Tomáš Veselý
cf955094b4
[NTUSER] IntSetTimer(): Use timer IDs range [256,32767] as on Windows (#7277)
Based on the Doug Lyons' test in #7087, I found that my previous fix stopped working partially. Or rather, it would only work until the 32767 indexes were exhausted. It seems to me that the behavior of the bitfield has changed, because when I published the previous patch, it passed my tests.

- Bit array generates free ID cyclically, in the previous code after 32767 indexes expired the same index was returned, because of this the previous fix would stop working after expiration, so change the logic of calculating the next index.
- Change the index range to 256-32767 to match Windows, indexes 0-255 can theoretically be used as reserved for system purposes.

Addendum to fd327db20f. CORE-9141
2024-10-22 18:10:34 +03:00
Timo Kreuzer
e4930be4ff [REACTOS] Use the ISO C and C++ conformant names: _wcsicmp, _stricmp
Stop using non-conforming wcsicmp, stricmp, strcasecmp
2024-10-20 14:12:25 +03:00
Timo Kreuzer
fb9571ee3c [WIN32K] Use UserRefObjectCo in co_UserFreeWindow 2024-10-20 09:35:14 +03:00
Timo Kreuzer
08b9354ff3 [WIN32K/USER] Fix callout object referencing in co_IntUpdateWindows
Move UserRefObjectCo, so that it covers co_IntSendMessage as well.
This caused a use-after-free during testing.
2024-10-20 09:35:14 +03:00
Timo Kreuzer
9eca7c52f6 [WIN32K] ASSERT that all callout references have been cleaned up on thread exit 2024-10-20 09:35:14 +03:00
Justin Miller
690783179e [SDK][WIN32SS] Make Them Build 2024-10-19 13:45:59 -07:00
Timo Kreuzer
a2a8ce4947 [WINSPOOL.DRV] Improve some stubs 2024-10-17 18:39:37 +03:00
Hervé Poussineau
42914af218 [WIN32SS:ENG] Only accept VGASave service (ie vga.sys driver) as the real VGA device
CORE-19796
2024-10-14 23:26:11 +02:00
Hervé Poussineau
b4e781d72d [WIN32SS:ENG] Make gpPrimaryGraphicsDevice variable static 2024-10-14 23:26:11 +02:00
Hervé Poussineau
6e71e94242 [WIN32SS:ENG] Make gpVgaGraphicsDevice variable static 2024-10-14 23:26:10 +02:00
Hervé Poussineau
0d8e26588a [WIN32SS:USER] Remove assignation of gpPrimaryGraphicsDevice (already done in EngpUpdateGraphicsDeviceList) 2024-10-14 23:26:10 +02:00
Hervé Poussineau
08a6834075 [VIDEOPRT] Allow conflicting resources if this is the video base driver
CORE-18960
2024-10-11 20:35:23 +02:00
Julen Urizar Compains
d3ec7cdd48
[USER32] Hackfix for CORE-17902 - The cursoricon (copyimage) that returns NULL to render - LR_COPYFROMRESOURCE (#6886)
* [USER32] Hackfix for CORE-17902 - The cursoricon (copyimage) that returns NULL to render - LR_COPYFROMRESOURCE

---------

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2024-10-07 05:46:02 -05:00
Timo Kreuzer
db419efbf2 [WIN32K] Fix protection of USER heap
Create the section with PAGE_READWRITE, not PAGE_EXECUTE_READWRITE and map in user mode with PAGE_READONLY, not PAGE_EXECUTE_READ.
Original commit was ea5261f in 2006. The comments suggest that back then the heap code had issues with it, which is not the case anymore.
2024-09-24 13:32:28 +03:00
Timo Kreuzer
dbb72f4923 [NTUSER] Fix unaligned access in co_IntSetWindowLongPtr 2024-09-15 12:09:09 +03:00
Timo Kreuzer
201f00ab6f [USER32][NTUSER] Implement (NtUser)SetClassLongPtr(A/W) 2024-09-15 12:09:09 +03:00
Timo Kreuzer
402bc38ba7 [NTGDI] Rewrite NtGdiPolyDraw
It is now a wrapper around GdiPolyDraw, which implements the main body of the function, while the Nt function only probes and captures the user mode data into safe kernel mode buffers.
Previously some people thought it was a great idea to just wrap the entire implementation in SEH, so when something throws an exception somewhere for whatever reason, we can just catch it here... and LEAK ALL RESOURCES IN THE PROCESS!
TODO: Rewrite all of this. It's broken everywhere.
2024-09-12 15:52:30 +03:00
Timo Kreuzer
7774a249ba [WIN32K:ENG] Fix return value in EngAlphaBlend 2024-09-09 22:16:00 +03:00
Timo Kreuzer
9414fb6b59 [NTGDI] Prevent NULL pointer dereference in CLIPPING_UpdateGCRegion
This can happen, when the paged pool is full. This will probably cause drawing issues, but at least we don't crash (in this place).
2024-09-08 03:20:52 +03:00
Timo Kreuzer
b385fc5985 [NTUSER] Fix a 64 bit bug in timer code
The return value of RtlFindClearBitsAndSet is an ULONG, assigning it to an ULONG_PTR will not sign extend it. The error value will stay 0xFFFFFFFF. Comparing it to (UINT_PTR)-1 will sign extend and thus compare it to 0xFFFFFFFFFFFFFFFF on x64.
Also use NUM_WINDOW_LESS_TIMERS to initialize the bitmap, rather than the calculated size. This does not make a difference with the current value (32768), but if it was not the case, the bitmap would be larger than this, resulting in invalid bitmap indices being returned, which would cause bugs later on. Finally remove an ASSERT that can be triggered by tests.
2024-09-08 01:52:50 +03:00
Timo Kreuzer
6ca6088f2c [NTUSER] Increase desktop heap size
Distinguish between the following 3 scenarios:
1. Interactive Winsta0, "Winlogon" desktop: use 128 KB
2. Interactive Winsta0, "Default" & other desktop: use 3 MB (x86) / 20 MB (x64)
3. Non-interactive winsta: use 128 KB

This is what Windows 2003 uses for the interactive desktops on x86 and what Windows 7 uses for x64. Fixes desktop heap exhaustion during testing. The previous value was 512 KB for all desktops.
It doesn't handle the even smaller "Disconnected" desktop, which is only meaningful for RDP sessions and we don't use it anyway.
See comments in the file for references.
2024-09-07 18:47:49 +03:00
Doug Lyons
07abea90d9
[NTUSER] Optimize BroadcastSystemMessage a bit. Follow-up of #6884 (#7215)
Optimize BroadcastSystemMessage with Environment parameter.
Minimize processing when UserModeMsg->lParam is NULL and KernelModeMsg->message != WM_WININICHANGE
Make sure that we have a UNICODE_NULL within lParamMsg based on comment from @whindsaks
2024-09-01 13:24:22 -05:00
Doug Lyons
a1bff5b94e
[NTGDI:FREETYPE] Account for spaces in x-dimension of IntExtTextOutW function (#7274)
@I_Kill_Bugs fix

CORE-11787, CORE-17721 and CORE-19721

For function IntExtTextOutW with space character, the x-dimension should be taken into account.
Fixes HexEdit 1.2.1 right side of display window not being cleared.

Account for x-dimension if TA_UPDATECP flag set and 'String' is not NULL.

Clarify 'etx' is ASCII End of Text
2024-09-01 13:18:23 -05:00
Marek Benc
633d2e6d0c
[NTUSER] Address memory leak in co_WinPosSetWindowPos(). (#7284)
CORE-19723
2024-08-31 15:07:33 -05:00
Timo Kreuzer
34586814ab [GDI32][NTUSER] Demote noisy debug prints 2024-08-30 16:06:41 +03:00
Doug Lyons
9c0eee0333
[NTUSER] Fix window not updating when scrollbars created and removed. (#7245)
* Revise conditions for window complete redraw.

CORE-19669

Co-authored-by: Oleg Dubinskiy <oleg.dubinskij30@gmail.com>
Co-authored-by: Vitaly Orekhov <7opex0@mail.ru>
2024-08-28 02:56:28 -05:00
Tomáš Veselý
fd327db20f
[NTUSER] IntSetTimer: Update HintIndex on each call (#7087)
* fix CORE-9141 - adding a change to IDEvent after each pass
If the first index is 0 the first returned ID will be 0x8000, which is fine.
Co-authored-by: Joachim Henze <joachim.henze@reactos.org>
2024-08-27 01:14:51 -05:00
Serge Gautherie
44662eaf62 [CMAKE] Use COMPILE_OPTIONS instead of superseded COMPILE_FLAGS
for set_source_files_properties().
2024-08-21 11:34:48 +03:00