Commit graph

518 commits

Author SHA1 Message Date
Joachim Henze 98b7ecd280 [FREETYPE] Fix 3 regressions in one patch
Fixes regression CORE-15785 (Zim Desktop Wiki 0.67 crashed) and
Fixes regression CORE-15755 (NLite 1.4.9.3 used wrong font)

without reintroducing regression CORE-15558 (AbiWord 2.6.8 font enumeration)

This is achieved by partial revert of
0.4.12-dev-320-g
6e4e5a004c
and got ack of Katayama Hirofumi MZ.

Thanks to patches author Doug Lyons.
Test-results: https://reactos.org/testman/compare.php?ids=66264,66267
2019-03-11 20:10:14 +01:00
Timo Kreuzer ba893e1172 [WIN32K] Keep a reference on an ETHREAD while THREADINFO exists 2019-03-10 11:14:40 +01:00
James Tabor d57f7becc3 [Win32SS] Add TextOut to GDI Batch
Add fix ups to PolyPatBlt and freetype.
TextOut supports 580 characters w/o Dx and Dx at a max of 193 characters
with Dx*1, both if offset is 0.

Noticed a lot of over drawing with start menu from ComCtl32 SB_SETTEXT
going through User32 DrawText/Worker ExtTextOutW. Explain why it might
be slowing down.

If issues arise, commenting out lines in win32ss/include/gdi32p.h can
help.

Example:
else if (Cmd == GdiBCTextOut) cjSize = 0;//sizeof(GDIBSTEXTOUT); <----
this one most of all.
 else if (Cmd == GdiBCExtTextOut) cjSize = 0;//sizeof(GDIBSEXTTEXTOUT);

Test results:
https://reactos.org/testman/compare.php?ids=66260,66262
2019-03-08 22:21:41 -06:00
James Tabor f35bb6e4c8 [NtGDI] Fix crash and simplify code.
Revert previous changes. simplify rendering check.
Fix missed unlocking which caused a crash.
2019-03-05 17:05:23 -06:00
James Tabor 3377fe184e [NtGDI] Change TextOut
Separate TextOut for internal use.
Use flTextAlign internally.
Not sure why GetDeviceCap was used for determining rendering. SVN commit
logs are unavailable. Include code from wine that might make more sense.
2019-03-05 16:03:15 -06:00
Timo Kreuzer 7dabd235ec [GDI32] Add casts to silence warnings on x64
The cast is required, because FARPROC is only compatible with function pointer types that return INT_PTR and the ones used return int/BOOL.
2019-03-04 21:58:42 +01:00
Timo Kreuzer 711dbd19f7 [GDI32] Fix bDDCreateSurface 2019-03-04 21:58:42 +01:00
Timo Kreuzer 2620930066 [DXG] Fix 64 bit build 2019-03-04 21:58:42 +01:00
Timo Kreuzer 72e43c4b33 [VGA_NEW] Fix 64 bit issues 2019-03-04 21:58:42 +01:00
James Tabor cf7bea11b2 [NtGDI] Use flag for text align mode.
Use the lTextAlign instead of the user one for internal use.
2019-03-04 12:17:00 -06:00
jimtabor b6262a25fd Use GDI Batch for PatBlt
This should increase speed a bit. Makes a good argument to use
PolyPatBlt for more than one call.
PolyPatBlt is not fully tested yet.
2019-03-02 11:30:21 -06:00
Pierre Schweitzer 0996dac683
[VIDEOPRT] Don't return uninitialized memory 2019-02-20 21:02:11 +01:00
Mark Jansen d7ae8690ab
[WIN32K:NTUSER] Do not try to reposition an off-screen menu as if it were a popup menu
CORE-15733
2019-02-16 15:45:46 +01:00
Hermès Bélusca-Maïto 7bbf8ae688
[WIN32SS:NTUSER] Bugcheck in case two mandatory initialization steps are not fulfilled.
- Bugcheck VIDEO_DRIVER_INIT_FAILURE in case initializing video fails.
- Bugcheck WIN32K_INIT_OR_RIT_FAILURE (Windows-compatible) in case
  the USER subsystem version does not match.
2019-02-10 22:44:24 +01:00
Katayama Hirofumi MZ 64987cf273
[FONT][WIN32SS] Improve font coordinate transformation (#1238)
Improve TextOut/ExtTextOut font rendering with SetWorldTransform. CORE-15554, CORE-15623
2019-01-31 11:57:28 +09:00
Katayama Hirofumi MZ bb33692400
[WIN32SS][NTGDI] Use ProbeForWrite in NtGdiSetBitmapBits (#1325)
Use ProbeForWrite instead of ProbeForRead. CORE-15657 and CORE-15695
2019-01-30 16:54:45 +09:00
Katayama Hirofumi MZ 1cd2f5438c [WIN32SS][NTGDI] Optimize UnsafeGetBitmapBits/UnsafeSetBitmapBits 2019-01-29 12:04:46 +09:00
Katayama Hirofumi MZ e7b222f4c5 [WIN32SS][NTGDI] Delete magic number 565 2019-01-27 20:54:19 +09:00
Katayama Hirofumi MZ 1cac3fbe63
[WIN32SS][NTGDI] Fix NtGdiSetBitmapBits in buffer size (#1313)
Let NtGdiSetBitmapBits function fail if buffer size was greater than 564. CORE-15657
2019-01-27 17:44:34 +09:00
Katayama Hirofumi MZ 6b8f9c0c2b
[WIN32SS][NTGDI] Alignment probe change in NtGdiSetBitmapBits (#1309)
Don't check WORD alignment in NtGdiSetBitmapBits to match Win2k3 behaviour. CORE-15657
2019-01-27 16:11:23 +09:00
Katayama Hirofumi MZ 29795a2d72
[WIN32SS][NTGDI] Improve UnsafeGetBitmapBits and NtGdiGetBitmapBits (#1308)
CORE-15657
2019-01-27 15:51:33 +09:00
Katayama Hirofumi MZ 0aa21c3366
[WIN32SS][NTGDI] Fix UnsafeSetBitmapBits (#1310)
CORE-15657
2019-01-27 15:32:52 +09:00
Katayama Hirofumi MZ 484943d04f
[USER32] Make App Switcher use the owner window's icon (#1299)
CORE-15672
2019-01-24 22:41:42 +09:00
Katayama Hirofumi MZ 687eba26f3
[USER32] Fix AppSwitcher (Alt+Tab) (#1296)
CORE-15653
2019-01-23 22:44:11 +09:00
Mark Jansen e022d8d7cb
[WIN32SS] Require at least the amount of extra memory, not the exact amount
This fixes Civ II trying to create scrollbars based on 'native' scrollbars.
2019-01-21 22:25:29 +01:00
Katayama Hirofumi MZ efe4605177
[WIN32SS][NTUSER] Fix caret position of Ghostscript (#1271)
CORE-13934, CORE-15656
2019-01-20 23:11:54 +09:00
Denis Malikov 37af78775d [WIN32SS:NTUSER] Fix Window-snap madness (#1246)
Desktop window was treated as possible to resize.
Fix for 7e396787

CORE-15624
2019-01-19 23:05:19 +01:00
Katayama Hirofumi MZ d0d909245f
[WIN32SS][NTUSER] Refactor PR #1226 (#1266)
Refactoring of #1226. CORE-12845
2019-01-19 23:56:33 +09:00
Katayama Hirofumi MZ 87bfbb3ec7 [WIN32SS][NTUSER] Fix PostTimeMessage message time 2019-01-16 22:59:36 +02:00
Denis Malikov 7e396787ed [WIN32SS:NTUSER] Implement "Window Snap" feature (#1226)
Implemented the following actions: stick the window on the left/right or maximize it,
with the following shortcuts:
 - Win key + Arrows;
 - drag to left/right screen border;
 - double-click on top/bottom.

CORE-12845
2019-01-15 14:36:41 +01:00
Mark Jansen 007ec0310c [WIN32K:NTUSER] Fix a case where the menu was off-screen on the other side
Found by Denis Malikov
CORE-15001
CORE-9037
2019-01-15 14:34:53 +02:00
Katayama Hirofumi MZ 1a4732703c
[WIN32SS][USER32] Make IsHungAppWindow check FNID (#1245)
CORE-11944
2019-01-15 20:32:23 +09:00
Katayama Hirofumi MZ 9285bd19de
[WIN32SS][USER32] Ghost is a hung window (#1244)
IsHungAppWindow(a ghost window) == TRUE. CORE-11944
2019-01-15 19:40:34 +09:00
Katayama Hirofumi MZ 8ca854251a
[WIN32SS][NTUSER] Don't freeze Task Bar in switching the app (#1243)
This avoids taskbar hung up.
2019-01-15 13:45:28 +09:00
Mark Jansen d2626f0c2a
[WIN32K:NTUSER] Find a better position for a menu that is off-screen
Previously, we would just stick the menu on the edge of the screen.
We should actually try to flip the menu around the point of origin,
and only when that fails move it to the edge of the screen.
CORE-15001
CORE-9037
2019-01-10 19:55:39 +01:00
Thomas Faber b2dcb8e0d8
[WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint. CORE-15569 2019-01-08 11:27:33 +01:00
Mark Jansen 0bfa6722ba
[GDI32] Add missing dependency 2019-01-06 21:07:28 +01:00
Mark Jansen 8ad7517446
[WINSPOOL] Semi implement DocumentPropertiesW
CORE-15522
2019-01-06 21:07:27 +01:00
Mark Jansen 796dd5f53c
[PRINTING] Semi-implement GetPrinterDriverW
CORE-15522
2019-01-06 21:07:27 +01:00
Mark Jansen 2e4457f223
[PRINTING] The first argument to PackStrings can be const. 2019-01-06 21:07:09 +01:00
Luo Yufan 95564d5e30 [TRANSLATION] Update Chinese translation. (#1223)
[CLIPBRD][SOLITAIRE][RAPPS][REGEDIT][WINHLP32][WORDPAD][FDEBUG][SYSDM][BROWSEUI][DEVMGR][IEFRAME][OLEDLG][SHELL32][SYSSETUP][INF][WINFILE][NTVDM][USER32]
2019-01-07 00:35:11 +09:00
Baruch Rutman 123a7c80e0
[NTUSER] Fix SetProcessDefaultLayout() (#1013)
- Add a check in co_UserCreateWindowEx() for parentless windows,
  that checks the default layout direction; if it's LAYOUT_RTL
  add the WS_EX_LAYOUTRTL flag to the extended window styles.

- Make the internal routine accepting also LAYOUT_LTR as a value for SetProcessDefaultLayout().
  Limit receiving value to LAYOUT_ORIENTATIONMASK (and not just LAYOUT_RTL)
  or LAYOUT_LTR, as per written in:
  https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setprocessdefaultlayout

Now all the applications that call SetProcessDefaultLayout() to mirror the layout get mirrored.
This is based on Wine.
2019-01-06 04:35:51 +01:00
Katayama Hirofumi MZ 6e4e5a004c
[FONT][GDI32] Fix font enumeration functions (#1221)
Fix EnumFonts, EnumFontFamilies and EnumFontFamiliesEx functions.
The charsets of the font substitutes are also enumerated.
Delete meaningless codes. CORE-15558
2019-01-06 10:43:34 +09:00
Hermès Bélusca-Maïto ca24df9c85
[WIN32SS:NTUSER] Completely update the metrics in co_IntInitializeDesktopGraphics().
This change is similar to what is done in UserChangeDisplaySettings()
after changing screen video mode.

This allows e.g. having windows to be correctly maximized during
2nd-stage GUI setup. To compare and reproduce during 2nd-stage GUI
setup, open cmd.exe (Shift-F10) and from there a GUI app, e.g.
regedit.exe, and maximize it. Observe the limits used by the window.
2019-01-05 16:42:16 +01:00
David Quintana 01e5cb0c04
Resource file strings cleanup (#581)
[CMDUTILS/AT] Fix missing translation strings in certain files.
[NOTEPAD] Fix SUBLANG code to brazillian.
[RAPPS] Fix missing translation strings in certain files.
[FDEBUG] Fix translation string ID.
[CPL/INPUT] Fix missing translation strings in certain files.
[ACPPAGE] Fix incorrect resource IDs.
[NETSHELL] Fix incorrect resource IDs.
[DEVMGR] Fix missing translation strings in certain files.
[LSASRV] Fix missing translation strings in certain files.
[RASDLG] Fix missing translation strings in certain files.
[SHELL32] Fix missing translation strings and incorrect resource IDs.
[TAPIUI] Fix missing translation strings in certain files.
[WINFILE] Fix incorrect resource IDs.
[NTVDM] Fix missing translation strings in certain files.
[USERSRV] Fix missing translation strings in certain files.
[BROWSEUI] One more missing string.
[FLTMC] Fix missing translation strings in certain files.

Detected using the TransDiffer tool (early alpha).
This doesn't include everything anymore, but I wanted to get the PR out of the way.
2019-01-05 15:44:16 +01:00
Timo Kreuzer cfd1647914
[REACTOS] Fix misc 64 bit issues (#783)
* [WIN32K] Fix handle calculation in DbgGdiHTIntegrityCheck
* [NOTEPAD] Fix MSVC warnings
* [PSDK] Simplify *PROC definitions in windef.h
* [VIDEOPRT] Don't try to use NtVdmControl on x64
* [FREELDR] Fix some macros
* [CRT] Make qsort 64 bit compatible
* [NTOS] Use #ifndef _WIN64 instead of #ifdef _M_IX86 around C_ASSERTs
* [FAST486] Fix 64 bit warnings and change DWORD to ULONG, so it can be used in kernel mode
* [APPHELP_APITEST] Fix 64 bit issue
2019-01-05 10:50:11 +01:00
Giannis Adamopoulos b3399c68e9 [WINSRV] ConSrvConnect: Always store the control dispatcher routine
This shouldn't be used only for console applications but can potentially be used by any application to receive shutdown notifications.
MSDN provides more information in the documentation for SetConsoleCtrlHandler. Our services.exe also expect to receive shutdown notifications in this way.
2019-01-04 19:38:36 +02:00
Giannis Adamopoulos cb2dcc0a2f [WINSRV] usersrv: Fix a wrong debug print 2019-01-04 19:30:17 +02:00
Giannis Adamopoulos 8ebff93b35 [WINSRV] usersrv: Don't terminate processes with no top level windows
Consrv will handle these.
2019-01-04 13:29:26 +02:00
Giannis Adamopoulos cc710885d0 [WINSRV] usersrv: remove wrong dead code and fix indentation 2019-01-04 13:29:26 +02:00
Giannis Adamopoulos 4bef6f5913 [WINSRV] consrv: Implement terminating console processes on shutdown
Also stub handling non-console, non-gui processes.
2019-01-04 13:29:26 +02:00
Giannis Adamopoulos 0a80b77e76 [WINSRV] usersrv: Simplify sanity checks in UserClientShutdown
UserClientShutdown will never be called for csrss so we don't need to have a check for that. The existing check was broken and wasn't doing anything anyway.
Handle processing winlogon by doing nothing so that consrv won't be bothered about it.
2019-01-04 13:29:26 +02:00
Katayama Hirofumi MZ dfa23b60ec [USER32] Let App Switcher activate only one window (#1214) 2019-01-03 16:34:58 +01:00
Hermès Bélusca-Maïto 333ce14dad
[WIN32SS] Try to recover display when changing the display mode fails for whatever reason.
This helps when e.g. changing the resolution on the Dell Latitude D531,
which reports that it supports large resolutions (e.g. 1920x1440x32 and
others larger than 1024x768x32) but fails to apply these.
This usually happens because PDEVOBJ_pSurface(), and more precisely
ppdev->pldev->pfn.EnableSurface(), fails for these resolutions.

- PDEVOBJ_bSwitchMode(): Set the new video mode, or restore the original
  one in case of failure + release the allocated ppdevTmp if previous
  calls fail. Also unlock in reverse order of locking order.

- UserChangeDisplaySettings(): In case PDEVOBJ_pSurface() fails (but has
  reverted the original video mode), we still need to refresh the
  display since the display may have been messed up.
2019-01-02 21:12:22 +01:00
Hermès Bélusca-Maïto fb4a6e38c7
[WIN32SS:NTUSER] Remove some hardcoded buffer sizes + number of chars vs. bytes mixup. 2019-01-02 21:12:21 +01:00
Hermès Bélusca-Maïto cc3fbfefac
[WIN32SS:NTUSER] Minor whitespace formatting. 2019-01-02 21:12:20 +01:00
Hermès Bélusca-Maïto 3f716870ca
[FRAMEBUF] Correctly check the return value of the EngDeviceIoControl() call and return adequate value in DrvAssertMode(). 2019-01-02 21:12:19 +01:00
Giannis Adamopoulos 60448f83fb [NTUSER] Fix a few tests related to desktops and window stations
- NtUserOpenInputDesktop: Don't crash if there is no input desktop yet
- NtUserOpenInputDesktop: Fail if the process doesn't belong to the interactive window station
- NtUserCreateWindowStation: Clear error on success
- DesktopWindowProc: Use UserOpenInputDesktop to get a handle to the input desktop
2019-01-02 17:15:40 +02:00
Julio Carchi 1e141573e4 [TRANSLATION] Spanish translations (#944) 2019-01-02 12:01:44 +01:00
Pierre Schweitzer 01b580d876
[WIN32K] Deny deviceless calls to EngDeviceIoControl
This fixes BSOD happening in ntoskrnl coming from win32k under certain
conditions with 3rd party display drivers (such as VBox or VMware)
2018-12-31 20:35:17 +01:00
Katayama Hirofumi MZ f757a13519
[FONT][WIN32SS] Partially implement font/text rotation (#1207)
Partially implement font/text rotation by LOGFONT.lfEscapement and improve the rendering image. If the angle was not a multiple of 90 degrees, then the background won't be filled. CORE-11848, CORE-15319
2018-12-31 18:56:43 +09:00
Timo Kreuzer 71fefa32db
[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
2018-12-30 12:19:11 +01:00
Thomas Faber e3c8002dfc
[WIN32K:NTUSER] Reference menus owned by a popup menu. CORE-15504 2018-12-30 00:25:01 +01:00
Mark Jansen 86ea03bf51
[FONT][WIN32SS] Re-add casts for gcc 2018-12-29 20:06:04 +01:00
Mark Jansen 85db46d75c
[FONT][WIN32SS] Remove casts 2018-12-29 19:47:00 +01:00
Mark Jansen 971c657b80
[FONT][WIN32SS] Hold the freetype lock while accessing freetype data 2018-12-29 19:47:00 +01:00
Mark Jansen 2e44e5ce54
[FONT][WIN32SS] Fix a memory leak 2018-12-29 19:47:00 +01:00
Mark Jansen 1f13b95e5b
[FONT][WIN32SS] Fix a memory leak 2018-12-29 19:47:00 +01:00
Mark Jansen 1d1b7f46fc
[FONT][WIN32SS] Hold the freetype lock while accessing freetype data 2018-12-29 19:47:00 +01:00
Mark Jansen 436d8d962a
[FONT][WIN32SS] Hold the freetype lock while accessing freetype data 2018-12-29 19:46:59 +01:00
Mark Jansen 2fa400b521
[FONT][WIN32SS] Do not return an uninitialized variable 2018-12-29 19:46:59 +01:00
Thomas Faber c526f94b8c
[WIN32K:NTUSER] Acquire the user lock exclusively in NtUserGetSystemMenu. CORE-15512 2018-12-28 13:59:33 +01:00
Katayama Hirofumi MZ 65f0926086
[MENU][WIN32SS] Fix non-menubar menu text Y position (#1199)
CORE-15226
2018-12-28 12:12:42 +09:00
Katayama Hirofumi MZ 6ee576f91d [FONT][WIN32SS] Optimize a bit 2018-12-27 09:23:49 +09:00
Katayama Hirofumi MZ be84465883 [FONT][WIN32SS] Follow-up of #1184 2018-12-25 21:54:33 +09:00
Katayama Hirofumi MZ d6cfeaef51
[FONT][WIN32SS] Refactor rendering text background (#1184)
Simplify the background filling codes. CORE-14856
2018-12-25 20:41:25 +09:00
Katayama Hirofumi MZ 968c8f37f1
[WIN32SS] Fix RLE4 bitmap decoding (#1188)
CORE-10553, CORE-11399
2018-12-25 18:04:21 +09:00
Giannis Adamopoulos 1a8d9f12d6 [NTUSER] Implement creating the system threads
- Add UserCreateSystemThread function that will signal csrss to create a new system thread.
- NtUserCreateWindowStation: Create the raw input thread and the desktop thread when the IO window station gets created.
- IntMakeHungWindowGhosted: Create the ghost system thread that will own all ghost windows.
- Let the raw input thread manage the window station of csrss.

[USERSRV] Remove system threads creating hack
- Implement SrvCreateSystemThreads
- Don't create the system threads in UserServerDllInitialization.
2018-12-19 16:13:18 +02:00
Giannis Adamopoulos 3ec7b163c9 [WINSRV] Add a hack to fix giving the api port to win32k
- Register our api port with win32k in SrvRegisterLogonProcess because UserClientConnect is never really called.

[NTUSER] Silence a noisy trace
2018-12-19 16:13:18 +02:00
Giannis Adamopoulos dad76af8a4 [NTUSER] Fix desktop and window station assignment for csrss
- NtUserSetInformationThread: Stub UserThreadUseActiveDesktop and UserThreadRestoreDesktop
- Properly mark the first thread that enters win32k belonging to csrss. At this point we assume that since gpepCSRSS isn't initialized yet, it probably is the first thread.

[WINSRV] Use NtUserSetInformationThread to set the current desktop when needed
-When csrss needs to use user32 or enter win32k, it first needs to assign the current thread to a desktop.
2018-12-19 16:13:18 +02:00
Giannis Adamopoulos 298a46acbf [NTUSER] Don't crash when the current thread doesn't have a desktop 2018-12-19 16:13:18 +02:00
Giannis Adamopoulos b2a5f5dbb3 [WINSRV] Fix setting the console title 2018-12-19 16:13:18 +02:00
Katayama Hirofumi MZ 00dd17e6e5
[USER32] App Switcher Arrow keys (#1136)
Implement Arrow keys on App Switcher (Alt+Tab). CORE-15449
2018-12-16 08:42:20 +09:00
Katayama Hirofumi MZ aa04a0a6d3
[WIN32SS] Replace ASSERT(FALSE); in IntGhostWindowFromHungWindow (#1116)
CORE-11944
2018-12-12 08:03:49 +09:00
Katayama Hirofumi MZ 43e2089476
[WIN32SS][FONT] Check NULL of Face->style_name (#1113)
CORE-15433
2018-12-11 18:32:39 +09:00
Katayama Hirofumi MZ f469acacec
[WIN32SS][USER32] Add Ghost codes (retrial of #1100) (#1112)
CORE-11944
2018-12-11 12:30:59 +09:00
Katayama Hirofumi MZ 99b055a506
Revert "[WIN32SS][USER32] Add codes for Ghost Window (#1100)" (#1110)
This reverts commit 1adefd180c. ReactOS wouldn't startup.
2018-12-11 11:30:00 +09:00
Katayama Hirofumi MZ 1adefd180c
[WIN32SS][USER32] Add codes for Ghost Window (#1100)
CORE-11944
2018-12-11 10:48:23 +09:00
Pierre Schweitzer 958ae44599
[WIN32SS] Shhhhh! 2018-12-09 22:00:53 +01:00
Pierre Schweitzer 53a313f456
[USER32] Complete French translation 2018-12-09 09:38:31 +01:00
Stanislav Motylkov 6c7094acb8 [USER32] Update russian translation
Addendum to 6a944b5.
2018-12-08 23:36:06 +01:00
Katayama Hirofumi MZ e90954304d
[WIN32SS][FONT] Add some assertions (#1098) 2018-12-06 12:47:02 +09:00
Katayama Hirofumi MZ 93757884c1
[WIN32SS][FONT] Improve FamilyUnknown Penalty (#1097)
CORE-15419
2018-12-06 09:32:02 +09:00
Katayama Hirofumi MZ 88ddb37acb
[WIN32SS][FONT] Use HHEA table metrics if (fsSelection & 0x80) (#1093)
This PR will fix too tiny glyph rendering. CORE-15166
2018-12-05 21:05:42 +09:00
Katayama Hirofumi MZ 3fd2deefac
[USER32] Fix Task Switcher (#1086)
CORE-10481
2018-12-03 04:26:15 +09:00
Katayama Hirofumi MZ 6a944b556a
[USER32] Add Ghost window class (#1082)
CORE-11944
2018-12-02 18:51:44 +09:00
Katayama Hirofumi MZ b09487fb44
[WIN32SS] Add IntGoGhost function (stub) (#1081)
CORE-11944
2018-12-01 20:59:07 +09:00
Giannis Adamopoulos 225c5c4a20 [WINSRV] Wait for the process to exit after calling NtTerminateProcess
NtTerminateProcess just queues an apc in every thread of the target process which in turn kills each thread. We need to wait so that all processes have enough time to exit before shutting down.
2018-11-27 10:28:31 +02:00
Andrew Boyarshin f48eb70af3 [WIN32K][NTUSER] Specify constant name explicitly (#1067)
Reduce confusion by specifying the omitted constant HWND_TOP == 0.
2018-11-25 14:31:23 +01:00
Andrew Boyarshin 62ec69278d [WIN32K][NTUSER] Tiny codestyle fix to NtUserLockWindowUpdate (#1066)
Fix indentation (inconsistent with the rest of the file) and return actual BOOL.
2018-11-25 14:31:04 +01:00
Pierre Schweitzer 6416ee982f
[WIN32SS] Don't leak memory on failure in IntGdiWidenPath().
CID 1441350
2018-11-16 22:07:08 +01:00
Pierre Schweitzer 2255d5f5b6
[WIN32SS] Avoid an user-after-free in FontFamilyFillInfo().
CID 1441367
2018-11-16 22:07:08 +01:00
Ercan Ersoy 44323e610f [TRANSLATION] Turkish translations of many components. (#1026) 2018-11-11 18:13:48 +01:00
Katayama Hirofumi MZ 64e217e97c
[WIN32SS][FONT] Fix regression of #1004 (#1012)
Signed-off-by: Doug Lyons <douglyons@douglyons.com>
CORE-15333
2018-11-05 16:24:23 +09:00
Katayama Hirofumi MZ 7f679a116b
[WIN32SS][FONT] Fix ntmCellHeight value to usWinAscent + usWinDescent (#1010)
CORE-15331
2018-11-05 06:03:53 +09:00
Katayama Hirofumi MZ 2737d9144d
[WIN32SS][FONT] Define IntUnicodeStringToBuffer function and use it (#1004)
- Define IntUnicodeStringToBuffer function to copy the contents of a UNICODE_STRING to a string buffer with a UNICODE_NULL correctly.
- Use it.
JIRA issue: N/A
2018-11-03 05:42:58 +09:00
Katayama Hirofumi MZ 4abba2b7ac
[WIN32SS][FONT] Improve Precision Penalty (#1006) 2018-11-03 05:37:05 +09:00
Katayama Hirofumi MZ 08cfe38ec6
[WIN32SS][FONT] Add ASSERT_FREETYPE_LOCK_HELD(); in FillTMEx (#1005)
Add a assertion for locking, in FillTMEx function of freetype.c. CORE-15166
2018-11-02 18:53:50 +09:00
Katayama Hirofumi MZ 5d26cf5e2a
[WIN32SS][FONT] Move IntUnLockFreeType(); in ftGdiGetTextMetricsW (#1002)
Adjust timing of FreeType unlocking in ftGdiGetTextMetricsW function of "freetype.c". JIRA issue: N/A
2018-11-02 16:29:18 +09:00
Katayama Hirofumi MZ ce077bb5d3
[WIN32SS][FONT] Add DPRINT1 and ASSERT for font resize failure (#1003)
Add DPRINT1 and ASSERT calls for font resize failure in IntRequestFontSize function. JIRA issue: N/A
2018-11-02 16:28:00 +09:00
Katayama Hirofumi MZ e39863bdf6
[WIN32SS] Fix SwitchToThisWindow for #998 (#999)
Reduce a failure in SwitchToThisWindow testcase of #998. CORE-15165
2018-10-30 17:24:47 +09:00
Katayama Hirofumi MZ 41b5f29514
[WIN32SS] Make window foreground in SwitchToThisWindow (#995)
CORE-15165
2018-10-30 08:13:05 +09:00
Mark Jansen 929a2c6637
[WIN32SS] Disable scrollbars when SIF_DISABLENOSCROLL is used
CORE-13918
2018-10-28 13:02:27 +01:00
Katayama Hirofumi MZ 43c78d4b75
[WIN32SS][NTGDI] Refactoring PATH_WidenPath (#888)
Preparation to support pen width.
Split IntGdiWidenPath function from PATH_WidenPath function.
IntGdiWidenPath is independent from DC.
CORE-2527, CORE-13534
2018-10-28 05:13:08 +09:00
Katayama Hirofumi MZ 5467cc9493
[NTUSER] NtUserxSwitchToThisWindow 2nd argument is fAltTab (#989)
Fix the 2nd parameter name of NtUserxSwitchToThisWindow. #988 similiarly.
CORE-15165
2018-10-28 03:27:49 +09:00
Katayama Hirofumi MZ 1f3353ac3b
[WIN32SS] SwitchToThisWindow 2nd argument is fAltTab (#988)
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-switchtothiswindow
CORE-15165
2018-10-28 03:14:04 +09:00
Katayama Hirofumi MZ 4bd0166e63
[WIN32SS] Move SwitchToThisWindow codes to win32k (#987)
- Implement user32!SwitchToThisWindow by NtUserCallTwoParam TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW.
- Improve user32!CloseWindow with using SetActiveWindow and ShowWindow (synchronized).
CORE-15165
2018-10-28 02:56:16 +09:00
Katayama Hirofumi MZ 3a9fe2b1bf
[WIN32SS][USER32] Simplify CloseWindow (#986) 2018-10-27 21:16:02 +09:00
Katayama Hirofumi MZ 84ae36c78d
[WIN32SS][USER32] Fix #984 (#985)
Sorry, I had to wait the build checks.
2018-10-27 20:32:51 +09:00
Katayama Hirofumi MZ d0e5f4ac11
[WIN32SS][USER32] CloseWindow does minimize, doesn't close (#984)
In Windows, user32!CloseWindow minimizes the window. It doesn't close the window actually. This is not a joke. This bad function naming is responsible to MS.
2018-10-27 20:21:55 +09:00
Stanislav Motylkov f819c9c460 [WIN32SS][NTUSER] Make offset only for menu bars (#983)
CORE-15226
2018-10-27 18:45:21 +09:00
Katayama Hirofumi MZ ed41bd71dd
[WIN32SS][NTUSER] Sunken menu item (#981)
CORE-15226
2018-10-27 04:20:09 +09:00
Katayama Hirofumi MZ 4ccad609e0
[USER32] Fix Task Switcher (#976)
This fix is needed for the Delphi GUI programs.
- Don't enumerate the windows whose owner window exists.
- Use PostMessage SC_RESTORE instead of ShowWindowAsync SW_RESTORE.
CORE-15165
2018-10-25 22:59:44 +09:00
Baruch Rutman 6a3b1879a1 [LPK][GDI32] Enable mirroring via version resource (#965)
Add a mechanism that detects via the version resource whether it's needed to mirror
the application layout or not. This is a "follow up" to commit 5b14b6f.

This code is taken from the GetProcessDefaultLayout() function from Wine
(called there "WIN_CreateWindowEx").

In Windows the version-resource mirroring happens when the GDI is loading the LPK.

- Implement mirroring via version resource. GDI linking on startup is required.

- GDI32: Add LPK loading on GDI startup.

To enable mirroring via version resource the lpk.dll must be loaded before any windows are created.
This is done through GdiInitializeLanguagePack() function which is called in GdiProcessSetup().

- LPK: Use Wine debug messaging.
2018-10-24 21:34:38 +02:00
Katayama Hirofumi MZ 70e27198ae
[FONT][WIN32SS] Fix the storage processing of IntGetOutlineTextMetrics (#942)
* Add IntStoreFontNames and IntStoreName functions and use them.
* SCALE_X and SCALE_Y macros
* Fix too long line
* Reduce type casts
2018-10-24 20:23:24 +09:00
Katayama Hirofumi MZ 62da624689
[WIN32SS][USER32] Fix SwitchToThisWindow (#929)
I'm not sure but it seems like no one can investigate it. I commit it.
2018-10-24 20:02:27 +09:00
Katayama Hirofumi MZ 2410bcb133
[FONT][WIN32SS] Improve readability of IntGdiGetFontResourceInfo (#945)
Make it human friendly code.
2018-10-24 19:58:03 +09:00
Katayama Hirofumi MZ 3545475f91
[WIN32SS][MENU] Fix menu text Y positioning (#887)
Fix the vertical position of menu bar text. CORE-15094
2018-10-24 19:54:41 +09:00
Adam Słaboń 7abc8be102 [TRANSLATION] Polish translation update
Polish translation of net, telnet, diskpart, devcpux, fontext, iernonce, lsasrv, themes, arping, frag, screensavers, ctm, fontsub, WinetestsGUI and localmon.
Update for dxdiag, msgina, msports, netcfgx, shell32 and syssetup.
2018-10-20 21:26:07 +02:00
Katayama Hirofumi MZ 801b71b9bf [FONT][WIN32SS] Use ExFreePoolWithTag instead of ExFreePool (#941) 2018-10-14 09:47:52 +02:00
Baruch Rutman 87c529a537
[LPK] Small fix and a related comment. (#890)
[LPK][USER32] Fix reading layout checks.

- Both functions don't care about DT_RTLREADING flag.
- Added a different method to check reading order.

[USER32] Remove gcc-build breaker semicolon.
2018-10-08 16:17:42 +02:00
Baruch Rutman 17d4df8102
[USER32] Implement UserLpkPSMTextOut(). (#890)
This function is a condensed version of LpkPSMTextOut() (from lpk.dll),
but not bug-for-bug equivalent.
The main difference is that the underscore is drawn without taking into
account any kind of script processing.
2018-10-08 16:16:52 +02:00
Katayama Hirofumi MZ 951335cd15 [FONT][WIN32SS] Use GOT_PENALTY macro to specify the penalty (#910)
Define and use GOT_PENALTY macro to specify the font penalty info.
CORE-5519
2018-10-08 14:38:38 +02:00
Hermès Bélusca-Maïto 40737bdddb
[USER32] Fix the ICO_ExtractIconExW() helper with respect to what is found with the user32_apitest:PrivateExtractIcons test.
CORE-15150
2018-10-07 20:32:42 +02:00
Mark Jansen 3d44f79e3e
[FONT][WIN32SS] Include the style name in the registry key.
Thanks to Doug Lyons for pinpointing the issue.

CORE-14044
2018-10-02 22:40:50 +02:00
Mark Jansen 3d3bd4e77e
[WIN32K] Work around GCC builds inventing dead keys.
CORE-14948
2018-09-23 20:03:14 +02:00
Joachim Henze ef016bfe0a [WIN32K:NTUSER] Fix WIN32K BSOD mentioned in CORE-15027
Fixes accessing nullptr / invalid handle in Window->SystemMenu
I could trigger this occasionally when moving Opera 12.18 window
in front of Spotify 1.0.29.92 window.

Fix was:
authored by Thomas Faber (Thank you!)
tested by me
reviewed by James Tabor
2018-09-21 03:04:31 +02:00
Katayama Hirofumi MZ 31019e8c0c [TRANSLATION] Update Romanian translation (#851)
Translation from Stefan Fulea.
CORE-15023
2018-09-14 11:04:36 +02:00
Stanislav Motylkov bac15d86bb [FONT][WIN32SS] Check whether Win32Process is NULL
CORE-15031
2018-09-13 18:19:19 +02:00
Katayama Hirofumi MZ 2ccfe267a0
[FONT][WIN32SS] Add dumping functions for debugging 2018-09-12 21:58:09 +02:00
Mark Jansen 6b67ef6e10
[WIN32K] Realize PTEXTOBJ in FontGetObject if it was not initialized 2018-09-12 21:33:45 +02:00
Mark Jansen 0364c58b0d
[FREETYPE] Mark an unhandled case as UNIMPLEMENTED
CORE-14948
2018-09-12 21:31:56 +02:00
Joachim Henze 31c981c02a [FREETYPE] Fix Regression "Monospaced font in LibreOffice" CORE-15018
LibreOffice started to show GUI in a mono-spaced font after 0.4.10-dev-466-g
35f62fc5ba

We can fix this by partial revert
as proposed by Katayama Hirofumi MZ, who was author of those changes as well.
We revert the changes in penalty system here.
2018-09-10 17:51:59 +02:00
Baruch Rutman ab5fdcc01f
[LPK] Make GetCharacterPlacement caret positions respect bidi. (#842)
- Try to make use of ScriptStringCPtoX when trying to fill the lpCaretPos struct member;
  if USP10 error happens fallback to the unreorder method.
- Remove now incorrect debug print.
2018-09-09 18:03:45 +02:00
Katayama Hirofumi MZ a244e4f6dd [WIN32SS][COMCTL32] Fix button text Y positioning (#766)
Fixes the vertical position of button text.
CORE-14906
2018-09-09 17:37:37 +02:00
Hermès Bélusca-Maïto 4d48b88bfb
[WIN32K:NTUSER] co_UserDestroyWindow(): Simplify the destruction of the owned windows. 2018-09-01 23:46:21 +02:00
Hermès Bélusca-Maïto e286c4c520
[WIN32K:NTUSER] Optimize IntWinListOwnedPopups() a little bit. Improve a trace. 2018-09-01 23:46:20 +02:00
Hermès Bélusca-Maïto f644a50cd7
[WIN32K:NTUSER] Code formatting only. 2018-09-01 23:46:17 +02:00
Katayama Hirofumi MZ c8749d379b [WIN32SS][FONT] Fix GetTextFace function and related (#829)
Google Chrome with -no-sandbox parameter in ReactOS wouldn't display the web page because first-chance exception raised.
CORE-14926

- Remove FullName, Style, and FaceName members from TEXTOBJ structure.
- Add TextFace member into TEXTOBJ structure.
- Add MatchFontName() and MatchFontNames() helper functions.
- Fix GetTextFace() and related.
2018-08-30 14:34:03 +02:00
Katayama Hirofumi MZ bd9a4499a8 [WIN32SS][NTGDI] Extend PATH_FillPath as PATH_FillPathEx (#798)
The new PATH_FillPathEx function takes an additional PBRUSH parameter.
CORE-2527
2018-08-24 13:37:59 +02:00
Baruch Rutman e7d2bbe726 [WIN32SS][LPK] Add BiDi support to menus and window captions (#738)
Added callback function that redirects calls to GreExtTextOutW that didn't went through lpk BiDi processing, calls that are from the kernel.

Completely solves JIRA issue CORE-6910.
2018-08-23 19:43:12 +02:00
Katayama Hirofumi MZ 5daa7b07c8 [FONT][WIN32SS] Refactor the loop (1 of 5) 2018-08-19 23:08:38 +02:00
Katayama Hirofumi MZ c4e0107765 [FONT][WIN32SS] Refactor the loop (2 of 5) 2018-08-19 23:07:37 +02:00
Katayama Hirofumi MZ b9b4c90303 [FONT][WIN32SS] Refactor the loop (4 of 5) 2018-08-19 23:05:35 +02:00
Katayama Hirofumi MZ 7b04962aed [FONT][WIN32SS] Refactor the loop (5 of 5) 2018-08-19 23:05:04 +02:00
Katayama Hirofumi MZ d641072cb2 [FONT][WIN32SS] Refactor the loop (3 of 5) 2018-08-19 23:03:13 +02:00
Hermès Bélusca-Maïto d0632b0bca
[WIN32K:NTUSER] In UserSetProcessWindowStation(), use a duplicated window station handle to be set in the EPROCESS:Win32WindowStation cache.
Fixes most of the user32:desktop window station handle reference count tests.
2018-08-19 22:18:42 +02:00
Hermès Bélusca-Maïto e3b9152935
[WIN32K:NTUSER] For processes that start without any window station and no desktops but manage these (e.g. winlogon.exe), assign their startup desktop when they assign a desktop to one of their threads. 2018-08-19 22:18:41 +02:00
Hermès Bélusca-Maïto 3270979327
[WIN32K:NTUSER] Add a temporary winsta/desktop-connection hack for CSRSS/USERSRV (connection to WinSta0).
Normally CSRSS must not be connected to any winsta or desktop by default. It should manually connect
to a winsta/desktop only when it has to do some GUI operations, and then disconnect afterwards.

[USERSRV] Temporarily hackfix the harderror dialog display to the current input desktop.
2018-08-19 22:18:40 +02:00
Hermès Bélusca-Maïto fd39f92fcb
[INCLUDE][WINLOGON] Rename the STARTF_SCRNSAVER flag to STARTF_SCREENSAVER,
as documented in "Advanced Windows NT" by Jeffrey M. Richter (Microsoft Press),
and in https://is.muni.cz/el/1433/jaro2010/PB167/um/cv5/undocumented_CreateProcess.pdf .

[INCLUDE][SERVICES][WIN32K:NTUSER] Add an undocumented STARTF_INHERITDESKTOP flag
for the STARTUPINFO::dwFlags structure member, whose purpose is to tell Win32k
that the created handles to the window station and desktop to which the
process is connecting to, can be inherited by its child processes.
It is used when starting interactive services.
Observed via API monitoring on Windows 2003.
2018-08-19 22:18:40 +02:00
Hermès Bélusca-Maïto f3699c3838
[WIN32K:NTUSER] NtUserCloseDesktop(): Use ObCloseHandle instead. 2018-08-19 22:18:39 +02:00
Hermès Bélusca-Maïto c697f191cf
[WIN32K:NTUSER] Make NtUserResolveDesktop() and IntResolveDesktop() work in a more Win2k3-compatible manner.
CORE-11933 and PR #621.

Since this API is also called from WINSRV when calling the AllocConsole() API,
it can be tested more-or-less easily. The internal helper IntResolveDesktop()
is also tested during process connection to a window station, when such process
first calls a USER32 or GDI32 function.
This is also the functionality tested by the user32:desktop apitest.

- Adjust how IntResolveDesktop() is called.
2018-08-19 22:18:37 +02:00
Hermès Bélusca-Maïto 83104d9f00
[WIN32K:NTUSER] Code style fixes only. 2018-08-19 22:18:36 +02:00
Hermès Bélusca-Maïto bc7810a97e
[WIN32K:NTUSER] Rename some variables with more natural names. 2018-08-19 22:18:36 +02:00
Hermès Bélusca-Maïto 1abeb905c3
[WIN32K:NTUSER] Split NtUserCreateDesktop() into the part that captures the user-mode data and the internal worker IntCreateDesktop() function, which will also be used later. 2018-08-19 22:18:35 +02:00
Hermès Bélusca-Maïto 7bc2ddd669
[WIN32K:NTUSER] Fixes for NtUserCreateWindowStation(), IntCreateWindowStation() and NtUserOpenWindowStation().
CORE-11933 and PR #621.

We are potentially going to modify the window station name to be
created or opened, by one with the format "Service-0x<luidhigh>-<luidlow>$",
in case the user provides an empty name.
Since we want to use the user-mode ObjectAttributes structure pointer so
that the Object manager can correctly perform the access checks and the
capture, we actually need to construct the new window station name in the
user memory space! This allows us then to fetch the new name in the
ObjectAttributes structure so that Ob can use it.
All of this is performed under SEH.

For NtUserOpenWindowStation(), we also need to be Windows-compatible and
detect whether user-mode gave instead the special "Service-0x00000000-00000000$"
name (observed via API monitoring) that is used when one tries to open a
window station with empty name.
2018-08-19 22:18:35 +02:00
Hermès Bélusca-Maïto 26933a0965
[WIN32K:NTUSER] Similarly to what was done in USERSRV for harderrors, introduce the _scwprintf() helper function based on the imported _vscwprintf(). 2018-08-19 22:18:34 +02:00
Hermès Bélusca-Maïto 43e2ab208a
[WIN32K:NTUSER] Get rid of the cached window station Name member, and instead just use the name stored in the NT Object's header.
CORE-11933 and PR #621.

- Remove the related hack-FIXMEs;
- Adjust NtUserGetObjectInformation() in accordance.
- Retrieve the window-station/desktop object type string in NtUserGetObjectInformation()
  also from the NT Object's header.

Also simplify the UOI_FLAGS case of NtUserGetObjectInformation() by reading
the handle inheritance information directly from the OBJECT_HANDLE_INFORMATION
structure returned by ObReferenceObjectByHandle().
2018-08-19 22:18:32 +02:00
Hermès Bélusca-Maïto dae57caa36
[WIN32K:NTUSER] Detect when the NtUserCreateWindowStation() caller has provided an empty window station name, and if so, generate a name in the format: "Service-0x<luidhigh>-<luidlow>$" .
CORE-11933 and PR #621.
2018-08-19 22:18:32 +02:00
Hermès Bélusca-Maïto ba018294d3
[WIN32K:NTUSER] Split NtUserCreateWindowStation() into the part that captures the user-mode data and the internal worker IntCreateWindowStation() function, which will also be used later.
Add a FIXME note about how we currently handle the window station name.
2018-08-19 22:18:31 +02:00
Hermès Bélusca-Maïto f47afc3b61
[WIN32K:NTUSER] In UserCreateWinstaDirectory(), use a string-safe printf, and use OBJ_KERNEL_HANDLE as well as a suitable desired access value in a ZwCreateDirectoryObject() call. 2018-08-19 22:18:30 +02:00
Hermès Bélusca-Maïto 2345d63ce3
[WIN32K:NTUSER] Add an extra optional "Process" parameter to the GetProcessLuid() function to be used alternatively in place of "Thread" to retrieve the LUID. 2018-08-19 22:18:30 +02:00
Hermès Bélusca-Maïto d77c493213
[WIN32K:NTUSER] Move the GetProcessLuid() function to the miscellaneous module. 2018-08-19 22:18:29 +02:00
Hermès Bélusca-Maïto 9c0564063d
[USER32] Implement the special case in CreateWindowStationW() that, when no window station name is provided (either NULL or empty string), does not open any WindowStation directory handle to be passed to the Win32k function.
Observed via API monitoring.
This corresponds to the case where Win32k creates a window station whose name is based on the logon session identifier for the calling process.

Add also a note about the fact that we need to use a per-session-based WindowStation directory name, as done already in Win32k.

CORE-11933 and PR #621.
2018-08-19 22:18:22 +02:00
Manuel Bachmann 71ab0b5d4c [NTDLL][NTUSER] Fix unselected text after WM_CBLOSTTEXTFOCUS
When we unselect text after the WM_CBLOSTTEXTFOCUS message,
make sure we also forget we have been focused at all;
otherwise the edit may become focused again, but with an
empty text selection.

CORE-10266
2018-08-19 14:24:34 +02:00
Thomas Faber 9bffdcb6e7
[USER32] Log the text of message boxes to help figure out some test bot timeouts. 2018-08-19 12:02:24 +02:00
Timo Kreuzer 27c3a4d26a [USER32] Fix copying from WNDCLASS to WNDCLASSEX
This must be done field by field, since the alignment of the structures is different on _WIN64
2018-08-17 22:13:18 +02:00
Hermès Bélusca-Maïto 36174f926b
[USER32] Implement support for the MB_SERVICE_NOTIFICATION flag in the MessageBox*() APIs. 2018-08-17 21:50:09 +02:00
Hermès Bélusca-Maïto 9b4673a3ca
[USER32] Update file description. 2018-08-17 17:12:25 +02:00
Hermès Bélusca-Maïto 2be262bfb1
[USER32] Implement SoftModalMessageBox() based on the original MessageBoxTimeoutIndirectW().
Additional changes:

- Adapt the message-box dialog procedure to correctly take into account
  the presence or absence of a CANCEL button and take appropriate actions.

- Cache the strings retrieved by MB_GetString() (add FIXME notices too).
2018-08-17 17:12:24 +02:00
Hermès Bélusca-Maïto 4f7318b759
[USER32] Code refactoring for MessageBoxTimeoutIndirectW(), in preparation for SoftModalMessageBox() implementation.
- Remove usage of ButtonLen and ibtn-pointer arrays, to make the code
  more generic and less dependent on the (maximal) number of buttons
  in the message boxes.

- Move around the code that computes the positions and sizes of the
  window controls.
2018-08-17 17:12:22 +02:00
Hermès Bélusca-Maïto e3fee2db82
[USER32] Get rid of the old MSGBOXINFO structure and use the new internal MSGBOXDATA structure instead. 2018-08-17 17:12:21 +02:00
Hermès Bélusca-Maïto b55cf70340
[USER32] Code formatting only. 2018-08-17 17:12:21 +02:00
Hermès Bélusca-Maïto cb77cc707f
[USER32] Specify the font to be used for the message-box in its dialog template, using DS_SETFONT and a font point size of 0x7FFF, instead of passing a font handle and setting the font of each control manually.
Also improve the flags used in the DrawTextW() call for calculating
the size to be taken by the message-box text.
2018-08-17 17:12:20 +02:00
Hermès Bélusca-Maïto fcfcf7a5c9
[USER32] Move related functions close to each other. 2018-08-17 17:12:19 +02:00
Hermès Bélusca-Maïto 5e4b3c7cf0
[USER32] Code formatting/indentation fixes only. 2018-08-17 17:12:15 +02:00
Katayama Hirofumi MZ bd2ab1e9bc [FONT][WIN32SS] Ignore identical mapping in IntLoadFontSubstList 2018-08-17 16:05:04 +02:00
Katayama Hirofumi MZ 5b89e663af [FONT][WIN32SS] Support MS symbol encoding (#759)
This commit adds support for the MS symbol encoding (FT_ENCODING_MS_SYMBOL) in our font engine.
It also fixes the display of the Anastasia font. And replacing our Marlett font with Windows' Marlett font is also fixed.

CORE-13269, CORE-14907
2018-08-16 14:38:46 +02:00
Thomas Faber 7b2bb85ceb
[WIN32K:NTUSER] Fix type confusion in MsgMemorySize. 2018-08-16 14:13:47 +02:00
Katayama Hirofumi MZ 11b7619a71 [WIN32SS] Fix DrawText wrt DT_CALCRECT | DT_VCENTER (#745)
The test program: https://jira.reactos.org/secure/attachment/47925/TnB3.zip
CORE-14896
2018-08-15 19:50:19 +02:00
Denis Malikov 9e198799d4 [WIN32SS][USER] fixing couple typos for WINVER >= 0x600
CORE-12596
2018-08-15 18:27:31 +02:00
Katayama Hirofumi MZ 35f62fc5ba [WIN32SS][FONT] Fix font metrics (#713)
Fix vertical alignment and Aspect penalty; improve font penalty system; fixes for Wine tests.
This is an update of #706. See CORE-11536 for more details.

The display of the following programs is fixed:
- Total Commander 8.52 setup: font displayed too large - CORE-11620.
- Effective File Search 6.8.1 german localization text rendering issues - CORE-14378.
- Font garbage in register splash screen in Foxit Reader 7.1.5 - CORE-9767.
- Calipers-1 is not displayed correctly - CORE-14302.
- Some MSI-installers draw their dialogs too large (example: Click-N-Type Virtual Keyboard 3.03.0412) - CORE-13161.
- Irfanview 4.50: font in zoom combobox displayed too large - CORE-14396.
- Rufus: The window and controls are displayed larger than necessary - CORE-14461.
2018-08-12 15:12:13 +02:00
Katayama Hirofumi MZ cbfe4d023b [WIN32SS][FONT] Fix the system logical stock font data (#709)
This fixes the stock font data to improve font selection.
CORE-14885
2018-08-10 15:37:37 +02:00
Katayama Hirofumi MZ 83891d2843
[CONSRV] Implement support for file/directory drag-and-drop (#692).
CORE-14833
2018-08-09 14:08:05 +02:00
Hermès Bélusca-Maïto 1a89a3e731
[CONSRV] Minor code re-organization. 2018-08-08 20:46:41 +02:00
Hermès Bélusca-Maïto a9064d3283
[CONSRV] Add a PasteText() helper function and use it. 2018-08-08 20:46:34 +02:00
Timo Kreuzer cf77354dce [REACTOS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer 0f8439aa71 [DLLS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer 3323d117c3 [WINSRV] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer 2a5e2a2ab6 [REACTX] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer e9ad66d52f [USER32] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer 7ad5f405cb [GDI32] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Katayama Hirofumi MZ 994a5f457f [WIN32SS][FREETYPE] Update copyright text 2018-07-29 15:23:58 +02:00
Katayama Hirofumi MZ 30830ca963 [WIN32SS] Add 5 members to FONTGDI structure 2018-07-29 13:11:48 +02:00
Katayama Hirofumi MZ 5e1a099cd1 [WIN32SS][FONT] Change the type of 2nd argument of IntRequestFontSize 2018-07-29 13:11:18 +02:00
Katayama Hirofumi MZ bfc6b719cf [USER32][WIN32SS] Implement TileWindows function (#678)
CORE-14815
2018-07-26 14:34:00 +02:00
Hermès Bélusca-Maïto b003d68ca5
[WIN32SS:NTUSER] Update SetWindowStationUser() and NtUserSetWindowStationUser() prototypes.
Also, improve NtUserSetWindowStationUser() capture order, make psid optional as it should (and avoid a user-mode triggered BSOD), and initialize luidUser only when everything succeeded.
2018-07-22 19:26:53 +02:00
Hermès Bélusca-Maïto 9bf7fb6f42
[WIN32SS:USER] Code formatting only. 2018-07-22 19:26:50 +02:00
Katayama Hirofumi MZ 42353ecbad [USER32][WIN32SS] Fix display of owned popup windows (#683)
An owned popup window should be hidden when its owner window was minimized.
- Add IntWinListOwnedPopups function.
- Fix ShowWindow and ShowOwnedPopups functions.

CORE-14818
See also: CORE-3326, CORE-12252, CORE-13168, and CORE-14824.
2018-07-13 16:03:45 +02:00
Katayama Hirofumi MZ 75b09f3f88 [EXPLORER][SHELL32][USER32] Implement 'Show the Desktop' action of Task Bar (#668)
The keyboard shortcuts Win+D and Win+M are also enabled.

- Implement IShellDispatch4::ToggleDesktop().
- Implement some commands in CTrayWindow.
- Add "sdk/include/reactos/traycmd.h" for tray commands.
- Fix task window switching.
- Improve the user32!SwitchToThisWindow() function and use it.

CORE-14318, CORE-13157
See also: CORE-14806 and CORE-8723
2018-07-13 10:34:42 +02:00
Katayama Hirofumi MZ cc3ba6e41c [USER32][WIN32SS] Improve CascadeWindows function (#677)
If the window is too large, then shrink it if possible.
CORE-14807
2018-07-09 14:52:30 +02:00
Katayama Hirofumi MZ 4e45a91547 [USER32][WIN32SS] Implement CascadeWindows function (#676)
CORE-14807
2018-07-09 01:51:14 +02:00
Hermès Bélusca-Maïto 25004bb5b4
[WIN32K:NTUSER] Remove the hackish code that has been introduced in IntSendChildNCPaint() in r73532 (6d7fcc4b) to attempt to pseudo-fix CORE-12071 and CORE-12085 while breaking other stuff, amongst which CORE-14763 is one of the latest manifestations, and re-enable the correct original code.
This fixes painting hangs under diverse situations, while CORE-12071 and
CORE-12085 remain fixed.
2018-07-08 15:39:50 +02:00
Hermès Bélusca-Maïto ee0511b49d
[WIN32K:NTUSER] Add diagnostic asserts in IntLinkWindow() and IntUnlinkWindow(). Don't link a window to itself in IntLinkWindow()! Add diagnostic traces for this situation, as well as in IntLinkHwnd().
Helps in correctly fixing CORE-12071 and CORE-12085.
2018-07-08 15:39:50 +02:00
Hermès Bélusca-Maïto 4d057cf626
[WIN32K:NTUSER] Formatting only! 2018-07-08 15:39:48 +02:00
Katayama Hirofumi MZ 6abc9f5b5a [WIN32SS] Fix NtUserGetClipboardData for text paste (#645)
Fix the NtUserGetClipboardData function for the synthesized text formats (CF_TEXT, CF_OEMTEXT and CF_UNICODETEXT).
CORE-11471
2018-06-30 17:12:23 +02:00
Timo Kreuzer 2170901e6a [WIN32K] Implement RECTL_bClipRectBySize() and use it in IntEngBitBlt() to clip the target rect against the bounds of the target surface. Also clip the source rect against the source surface. Fixes remaining part of CORE-14463 2018-06-30 16:40:04 +02:00
Timo Kreuzer 79ad68ddc3 [CMAKE] Zap builddir.h.cmake and instead define macros globally
This changes __RELFILE__ to always be relative and not rely on a GCC extension, since __FILE__ is *always* relative to the root.
2018-06-30 13:26:56 +02:00
Mark Jansen ae8762e15e
[FREETYPE] Allow a NULL style_name.
CORE-14775
2018-06-29 21:55:54 +02:00
Katayama Hirofumi MZ 1345cb77b3 [FONT][FREETYPE] Refactor global variable names and locking (#591)
Refactor the font engine code in "win32ss/gdi/ntgdi/freetype.c".
- Add "g_" prefix to global variables.
- Make the locking macros function-like.
CORE-13065
2018-06-28 22:00:55 +02:00
Katayama Hirofumi MZ 8a685446b6 [WIN32SS] Fix IntSynthesizeDib to synthesize CF_DIB with CF_BITMAP (#644)
CORE-14770
2018-06-28 19:27:40 +02:00
Hermès Bélusca-Maïto 8a83c24419
[CONSRV] Don't show the newly-created console if the window station, on which the console is created, is not interactive. 2018-06-10 04:00:18 +02:00
Hermès Bélusca-Maïto 243fe6d6a3
[CONSRV] Use a similar parameter name as in other functions. 2018-06-10 04:00:18 +02:00
Hermès Bélusca-Maïto 9d3d5e464d
[WIN32K] Fix DBG_PRINT macro. 2018-06-10 04:00:06 +02:00
Hermès Bélusca-Maïto 7cb411e88f
[USERSRV] HardError: Free WindowTitleU buffer only if we really allocated it. 2018-06-09 15:37:54 +02:00
Eric Kohl 4911382913 [NDK] Replace the SYSTEMTIME fields StandardDate and DaylightDate in RTL_TIME_ZONE_INFORMATION by TIME_FIELDs and fix resulting errors
Patch will be sent upstream.

CORE-14658
2018-05-31 17:48:29 +02:00
Baruch Rutman a4a59ad413 [GDI32][LPK] BiDi support for ExtTextOut and GetCharacterPlacement (#534)
Introduce BiDi (bi-directional text) support for ExtTextOut and GetCharacterPlacement, using Wine's GDI BIDI_Reorder function.
Solves the main issue with CORE-7003.

To be compatible with Win2k3+, introduce the "Language Pack" (LPK) dll.
- All the bidi code is removed from gdi32 and replaced by calls to LPK.
  Gdi32 uses dynamic linking to lpk.dll. In case of linking failure no bidi processing will be available.
- Implemented LpkGetCharacterPlacement.
- Implement LpkExtTextOut.
- Add a demo test program to show how the apis should function.
- Added all the remaining code, added special case for lpDx calculation if also GCP_GLYPHSHAPE flag was called.
  Applications that call GCP that use GCP_GLYPHSHAPE flags should also use the GCP_REORDER flag.
  (As written in https://msdn.microsoft.com/en-us/library/windows/desktop/dd144860(v=vs.85).aspx )
- Add ETO_RTLREADING flag handling.
  Imported the ETO_RTLREADING flag handling from wine, which changes the string part order (runs).
  A RRR1LLLRRR2 string without will show as RRR1LLLRRR2 without it, with it RRR2LLLRRR1.
2018-05-30 14:41:22 +02:00
Serge Gautherie 3ca1ac639c [REACTOS] Improve/Fix some "printf" formats (#555)
The smbios.c one was initially spotted by "Alahndro" on CORE-6328.
2018-05-30 14:18:23 +02:00
Bișoc George 739e72b6ed [USERSRV] Romanian translation update 2018-05-27 17:35:47 +02:00
Hermès Bélusca-Maïto a55d7c692b
[WIN32K] Implement UOI_FLAGS in NtUserGetObjectInformation(). Based from a patch by Jérôme Gardou.
CORE-13447 CORE-14422

This fixes closing nLite 1.4.9.3 (.NET2) application, as well as any
other program that expects that the interactive window station is
reported as being visible. I thank Mark Jansen and Joachim Henze for
help and testing.
2018-04-22 23:00:55 +02:00
Serge Gautherie 6d912629f7 [LOCALSPL] Fix 2 Clang-Cl warnings about ullResult and "UserName"
- "warning: comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]"
- "warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]"

CORE-14306
2018-04-18 18:10:47 +02:00
Joachim Henze 083c3d992b [USER32] Fix compilation when USE_VERSIONED_CLASSES is not defined
Variable 'Status' would be set but not used otherwise in this case.
This commit will not fix or improve CORE-13278,
but was spotted when having a look at that.
2018-04-12 17:57:38 +02:00
Joachim Henze 14f0e62f9a [WIN32SS][NTDDRAW] Fix ddraw palette regression CORE-13714
This nice patch of Jerome Gardou improves palette
when VBEMP & inbuilt Mesa is used for
Diablo II, MS Age Of Empires 1, Anno 1602
to the state we had in SVN r75060 and below.

We already committed this fix into 0.4.8-release before.
2018-04-11 15:39:54 +02:00
Adam Słaboń abe6bbabfb [TRANSLATION] Polish translation update for drwtsn32, winlogon and usersrv. (#475) 2018-04-10 22:54:34 +02:00
Hermès Bélusca-Maïto 75e80632d1
[USERSRV] HardError: Fix compilation warning; fix few comments; fix the default empty window title string. 2018-04-08 16:15:56 +02:00
Hermès Bélusca-Maïto 29d56f2b29
[USERSRV] Hard-error improvements 7/7
- Use a more descriptive "unknown hard error" string than Windows' one.
- Improve the computation of the buffer size for the hard error message
  by using _vscwprintf() instead of just "guessing" which size the fully
  printf'ed message could be.
2018-04-07 18:48:13 +02:00
Hermès Bélusca-Maïto 2363fee51f
[USERSRV] Hard-error improvements 6/7
Make UserpFormatMessages() return the possible timeout for the hard error; use it when displaying the hard error message boxes.
2018-04-07 18:48:12 +02:00
Hermès Bélusca-Maïto 08d70697a3
[USERSRV] Hard-error improvements 5/7 - Implement STATUS_SERVICE_NOTIFICATION handling.
- In UserpCaptureStringParameters(), always capture the parameter
  strings with a terminating NULL. Also, no need to convert them to
  ANSI if they are used with a STATUS_SERVICE_NOTIFICATION message.
- Determine within UserpFormatMessages() the message box flags to be
  used, either from the message parameters (if STATUS_SERVICE_NOTIFICATION)
  or from the proposed response options and message status severity.
  These flags are then used by both UserpShowInformationBalloon()/UserpShellHardError()
  and by UserpMessageBox().
- Improve Message validation (especially for STATUS_SERVICE_NOTIFICATION).
- Try to display the hard error status number if it's an unknown one.
2018-04-07 18:48:11 +02:00
Hermès Bélusca-Maïto 9ea2783e56
[USERSRV] Hard-error improvements 4/7
- Make UserpFormatMessages() always succeed by falling back on
  static string buffers if allocating large string buffers fail due to
  lack of memory. Then the hard error popups will have truncated
  strings, but at least something will be displayed instead of nothing,
  thus alerting the user that something went wrong anyway.
- Simplify a bit the code by moving the NtOpenProcess(),
  UserpCaptureStringParameters() and UserpFreeStringParameters() calls
  inside UserpFormatMessages(). This also allows simplifying its
  prototype.
2018-04-07 18:48:10 +02:00
Hermès Bélusca-Maïto 5a1a35ca5a
[USERSRV] Hard-error improvements 3/7
- Cache localized hard error message components: the status severity,
  the system process name and the unhandled exception debug strings.
- Try not to fail too much. In particular, don't fail if a string could
  not be correctly captured in UserpCaptureStringParameters() (we then
  use a default empty string). The next aim is to make UserpFormatMessages()
  not failing at all.
- Use RtlStringCbPrintf(Ex)W where possible so that one can use counted
  (and not NULL-terminated) UNICODE_STRINGs where possible. This allows
  using counted resource strings without having to allocate memory.
- If available, prepend the window title of the application that
  triggered the hard error to the hard error message box caption.
2018-04-07 18:48:09 +02:00
Hermès Bélusca-Maïto 2b299f5fec
[USERSRV] Hard-error improvements 2/7 - More failure path handling.
In particular do not always fail as soon as there is an error, because they may be the sign of an OS problem and this is precisely in this case that we want to display a hard-error.
2018-04-07 18:48:08 +02:00
Hermès Bélusca-Maïto 6718a1aa83
[USERSRV] Hard-error improvements 1/7
- Use hard-error captions depending on the status code severity.
- Improve handling of the STATUS_UNHANDLED_EXCEPTION error. Start
  implementing the display of the dialog button descriptions ("OK" to
  terminate the application; "Cancel" to debug the application).
- Add support for the "ErrorMode" and "ShellErrorMode" registry values
  under HKLM\System\CurrentControlSet\Control\Windows.
- Use MessageBoxTimeoutW() in UserpMessageBox() to support different
  message box timeouts.
- Log hard errors into the System event log.
2018-04-07 18:48:06 +02:00
Ercan Ersoy 8c2e91897a [TRANSLATIONS] Update and add Turkish translations (#455)
- Added Turkish translations for winetests/GUI and localmon.
- Modified Turkish translations for usersrv, user32, localmon, logon,
  3dtext, kbswitch, winemine, spider, solitarie, clipbrd and charmap_new.
2018-04-01 19:27:08 +02:00
Kláben Szabolcs Bence (Tudi20) a1e061499f [TRANSLATION][USERSRV] Add Hungarian Translation (#442) 2018-04-01 19:13:35 +02:00
Serge Gautherie a0b5b47352 [WIN32SS:FRAMEBUF] Improve/Fix DrvSetPointerShape(), from r7864 (#457)
- Fix a copypasta.
- Remove dead code.

Thanks to mudhead, who spotted most of these.

NB:
This EXPERIMENTAL_MOUSE_CURSOR_SUPPORT code isn't compiled by default since r7865.

CORE-14511
2018-04-01 18:51:54 +02:00
Amine Khaldi 407c54bae3 [LOCALUI] Sync with Wine Staging 3.3. CORE-14434 2018-03-25 12:47:19 +01:00
Timo Kreuzer 2d9c88e0c5
[WIN32K] Fix 64 bit issues (#420)
- Fix ULONG/SIZE_T issues
- Use LOWORD/HIWORD
- Change a struct member to HANDLE
- Implement lstrlenW helper function
2018-03-18 15:53:52 +01:00
Hermès Bélusca-Maïto 68430db462
[USER32] Fix GetWindowTextLength() blocking call using the same technique as in GetWindowText(). Fix indentation in GetWindowText(). 2018-03-17 23:47:16 +01:00
Mark Jansen 428e4617e9
[WIN32K] Do not try to compare a long name against a truncated name.
This fixes gdiplus_winetest:font crashing.
ROSTESTS-154
2018-03-15 20:16:04 +01:00
Mark Jansen 37a34a21a9
[WIN32K] Do not truncate localized font names.
ROSTESTS-154
2018-03-15 20:16:04 +01:00