Commit graph

511 commits

Author SHA1 Message Date
jimtabor 65a814203f [User32] Sync Port Wine.
Patch :
Vijay Kiran Kamuju : Add DlgDirList wildcard checks.
Nikolay Sivov : Fix setting negative dialog item ids.
Alistair Leslie-Hughes : Don't reset focus if current dialog is a child.
Dmitry Timoshkov : If there is no dialog controls to set focus to then
set focus to dialog itself.
Zhiyi Zhang : Send notification for the focused button in
IsDialogMessage().
Huw Davies : Avoid using the comma operator in a while condition.

Patch skipped : a525631920d74e9d797f38305b89e63aed1c5c41 : Scale dialog
base units based on DPI awareness.
2019-06-28 21:52:04 -05:00
Katayama Hirofumi MZ bf06c94e15
[WIN32SS][NTGDI] Strictly check in XFORMOBJ_iSetXform (#1676)
Check if the determinant of the given transformation matrix is non-zero. If zero, the function returns DDI_ERROR without change. CORE-15554
2019-06-24 21:32:40 +09:00
Hermès Bélusca-Maïto 0f3f8b2a35
[VGA_NEW] Fix confusion between CRTC Controller and Graphics Controller registers. 2019-06-23 02:12:24 +02:00
Hermès Bélusca-Maïto 78d20a9b3a
[WIN32K] Fix spelling typo. 2019-06-23 02:12:23 +02:00
Joachim Henze 1158c24194 [WIN32SS] Fix multiple scrollbar redraw issues
This fixes:
- CORE-15911 "Scrollbars do not dissapear when Maximizing and not needed"
- CORE-10617 "ListView corrupt scrollbar upon resizing the column-header"

and will appease regression:
- CORE-15429 "Uninitialized scrollbars in 'My Computer'"

By applying clientFix.patch from CORE-15911 contributed by JIRA-user 'I_Kill_Bugs'.

https://reactos.org/testman/compare.php?ids=66723,66729

Earlier I already committed this fix into 0.4.12-RC-9-g
5ac548544f
2019-06-22 22:27:23 +02:00
jimtabor 8c7705eb5d [Win32SS] Complete Print Driver Callbacks
This callback works. Haven't commit the rest yet. Still thinking about
the data packets types and shapes. Using wordpad to test this. It works,
loads and unloads due to incomplete driver support and no PDEV. It
crashes in ComCtl32 while loading a text file. When this gets committed
without a solution, the code will be commented out.
2019-06-22 12:02:51 -05:00
James Tabor 40c42305c3 [Win32SS] Add Driver Callback
Add user driver callback to be used later on.
2019-06-21 13:10:03 -05:00
Katayama Hirofumi MZ 641a0ea99b
[WIN32SS][NTGDI] usWinAscent and usWinDescent must be treated as signed (#1670)
TT_OS2.usWinAscent and TT_OS2.usWinDescent must be treated as FT_Short. These values affect font metrics. This PR will fix CORE-14994.
2019-06-20 18:58:45 +09:00
Thomas Faber 00e882c2b1
[WIN32K:ENG] In PDEVOBJ_vRefreshModeList, find a proper match for the current display mode instead of assuming a constant index. CORE-15325 2019-06-16 12:45:58 +02:00
Mark Jansen 04712d418c
[WIN32K] Use KeStackAttachProcess 2019-06-15 21:26:41 +02:00
Mark Jansen 97d1590914
[WIN32K] Attach to the target process before unhooking
CORE-16083
2019-06-15 21:26:41 +02:00
Mark Jansen 7a3937ddaf
[WIN32K] Fix indenting in IntRemoveHook 2019-06-15 21:26:35 +02:00
Joachim Henze 3cc50cedaf [WIN32SS][NTUSER] Addendum to 0.4.12-dev-956-g0197c4f CORE-15893
Aims PixelPerfection for a regression that was introduced by
0.4.12-dev-954-g
1f619b2781

and then improved already by
0.4.12-dev-956-g
0197c4f875

The tweaking got ack of Jim Tabor. Test results:
https://reactos.org/testman/compare.php?ids=68026,68029
2019-06-10 15:33:31 +02:00
Joachim Henze 8f482af0a8 [WIN32SS][FREETYPE] Avoid performance regression CORE-16020
by reverting essential parts of "Font rotation at arbitrary angles"
which was once committed in several steps:

Initial commit (PR#1207)
0.4.12-dev-243-g
f757a13519
broke font rendering for GTK apps CORE-15623

Second commit (PR#1238)
0.4.12-dev-558-g
64987cf273
restored font rendering in GTK apps but introduced slowdown CORE-16020

Katayama agreed to the temporal revert and will try to come up later
with a performance optimized version.
We revert in 0.4.12-RC and 0.4.13-dev.

The revert will cause failure-increases in gdi32:TextTransform
https://reactos.org/testman/compare.php?ids=67898,67901
2019-06-06 02:24:20 +02:00
Serge Gautherie 7804cf035a [USER32] RegisterClipboardFormatA(): Enable a SetLastError() (#1612) 2019-06-05 18:15:02 +02:00
Serge Gautherie b84b755e2b [LOCALSPL] Check DBG with #if, not #ifdef
Addendum to r74433.
2019-06-05 03:32:52 +03:00
Serge Gautherie 38db074491 Misc addendum to CORE-14271 (#1529)
* [ADVAPI32] Simplify RtlCreateUnicodeStringFromAsciiz() return value check

RtlCreateUnicodeStringFromAsciiz() returns a BOOLEAN, not a BOOL.

No functional change.

Addendum to
CORE-14271

* [USER32] Simplify RtlCreateUnicodeStringFromAsciiz() return value check

RtlCreateUnicodeStringFromAsciiz() returns a BOOLEAN, not a UINT.

Also, add a FIXME.

No functional change.

Addendum to
CORE-14271

* [USER32] Simplify RegisterClipboardFormatA/W() a bit

No functional change.

* [UDFS] Simplify SeSinglePrivilegeCheck() return value check

No functional change.

Addendum to
CORE-14271
2019-06-04 16:56:33 +02:00
James Tabor 9f57320175 [GDI32] Meta File Fix Ups
Remove pointer hack. Safer since using wines Enhanced Meta headers with
unknown wine magic information.
2019-06-03 15:49:14 -05:00
Katayama Hirofumi MZ a73c17fcd9
Revert "[USER32] Make App Switcher use the owner window's icon (#1299)" (#1605)
This reverts commit 484943d04f.
2019-06-03 08:47:43 +09:00
Katayama Hirofumi MZ f7fc10c17c
[WIN32SS][USER32] Fix Task Switcher more (#1602)
This PR will fix task switcher (Alt+Tab) as Win2k3. It became more reliable. CORE-15653
c.f. Raymond Chen's article: http://blogs.msdn.com/b/oldnewthing/archive/2007/10/08/5351207.aspx
2019-06-02 19:17:50 +09:00
James Tabor 931c72fde5 [NtUser] Fix Clipboard Synthesized Returns
Add supported for Meta file synthesized renderings.
See CORE-12143.
2019-06-01 07:23:58 -05:00
jimtabor 73558e94df [User32] Fix Clipboard Meta Test Results
Fix meta data handle returns.
2019-05-31 22:59:29 -05:00
jimtabor da264743e1 [Win32SS] Support Clipboard Metafile
Major fix ups and plugging in missing code changes. Handle code is from
another project currently being developed for ReactOS.
See CORE-12143
2019-05-31 21:44:17 -05:00
Katayama Hirofumi MZ 1010f3796e
[USER32] Fix behavior of Task Switcher (Alt+Tab) (#1591)
Task Switcher didn't correctly behave on the windows with WS_EX_APPWINDOW extended style. CORE-15653
2019-05-31 17:02:47 +09:00
jimtabor 268b21c2f9 [NtGDI] Support Clipboard Metafile
Fuctions that help transfer meta file data from one process to the next.
See CORE-12143.
2019-05-30 16:36:33 -05:00
jimtabor e229b3eea7 [GDI32] Support Clipboard Metafile
Metafile patch from Katayama Hirofumi MZ. See CORE-12143.
2019-05-30 16:33:23 -05:00
Katayama Hirofumi MZ 86046a9bf4
[WIN32SS][NTGDI] Don't use FLOAT in ftGdiGetGlyphOutline (#1576)
Don't use FLOAT variable in ftGdiGetGlyphOutline function. CORE-15838
2019-05-27 18:35:43 +09:00
Katayama Hirofumi MZ c52b8288d1
[WIN32SS][NTGDI] Avoid allocation of zero size in NtGdiGetGlyphIndicesW (#1577)
In NtGdiGetGlyphIndicesW function, allocation of zero size had caused fatal failures.
Avoid allocation of zero size in ExAllocatePoolWithTag calls. Optimize for cwc == 0. CORE-12825
2019-05-27 16:52:45 +09:00
Katayama Hirofumi MZ a0be8d2c2d
[WIN32SS][NTGDI] Improve Text Transformation (#1573)
Reduce gdi32_apitest!TextTransform failures. Optimize for speed. Add Width and Escapement parameters to FONT_CACHE_ENTRY structure.
CORE-15554
2019-05-26 16:12:35 +09:00
Hermès Bélusca-Maïto 5ca9c9c138
[CONSRV] Minor code cleanup. 2019-05-26 00:00:39 +02:00
Katayama Hirofumi MZ fabbd7c1c1
[WIN32SS][NTGDI] Don't use FLOAT for orientation (#1574)
Addendum to 0137096. Use 16.16 fixed-point values instead of FLOAT. CORE-15838
2019-05-24 08:24:21 +09:00
Katayama Hirofumi MZ 0137096449
[WIN32SS][NTGDI] Don't use FLOAT in IntEscapeMatrix (#1572)
Appendum to 1a40284. Use a 16.16 fixed point value instead of FLOAT. CORE-15838
2019-05-23 19:40:54 +09:00
Katayama Hirofumi MZ cba1a2f742 [WIN32SS][NTUSER] Fix msvc-x64 build 2019-05-23 08:32:41 +09:00
Joachim Henze 1a402847ed [FREETYPE] Fix regression CORE-16041 Font/Text Rotation Angles Too Small
Thanks to the patches author Doug Lyons
and the reviewers hbelusca and Katayama Hirofumi MZ.

The regression was introduced by
0.4.13-dev-24-g
61475b9fed
2019-05-22 23:15:09 +02:00
jimtabor 0f29b3faa7 [NtUser] Fix setting screen size.
Back set change size to the server information metrics.

Fixes CORE-15477. Still more work is required.

Patch based on reactosfanboy original patch.
2019-05-21 16:24:52 -05:00
Hermès Bélusca-Maïto c4e2826c73
[CONSOLE][CONCFG][CONSRV] Provide support for specified additional TrueType fonts + bugfixes.
CORE-12451 CORE-13182 CORE-13196

- CONSOLE: Initialize the additional TrueType fonts cache.
  * Fix the font preview when a TrueType font has been selected.
  * Refresh the available fonts and the font preview when the selected
    code page is changed (Work In Progress), or when the OS pool of
    font resources has changed (WM_FONTCHANGE message).

- CONCFG: Implement support for the additional TrueType fonts cache:
  the contents of the cache is enumerated under the registry key
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont

  * Add helper functions and macros.
  * In CreateConsoleFontEx(), set the mandatory font pitch&family flags
    and remove those that we do not support.
  * In IsValidConsoleFont2(), update the validity checks and the
    documentation links.

- CONSRV: Load/refresh the additional TrueType fonts cache when needed.
2019-05-19 23:10:41 +02:00
jimtabor 2161dd85dc [NtUser] Fix Paint Messages
This is a HACK for forcing painting of non client areas. Paint code
seems very restricted.

See CORE-7166 & CORE-15934.
2019-05-13 11:31:58 -05:00
jimtabor 5418f394ab [Gdi32] Batch Type Select Mode for Testing
Do not allow setting hdc if no batch type is found.
See CORE-15988.
2019-05-11 11:22:06 -05:00
jimtabor dc7f4f682f [Win32SS] Plug in Last Batch
Plugging in last batch after 12 years.
2019-05-09 12:35:21 -05:00
jimtabor 94b4b5c127 [NtGDI] Fix ExtSelectClipRgn Tests
Fix results from tests, add (last one) gdi batch support for
ExtSelectClipRgn. Left commented out test code in tree this time.
Pass Katayama Hirofumi MZ SelectClipRgn tests. After commit will plug in
the last batch. After 12 years.

See CORE-13817 and CORE-15906.
2019-05-09 12:33:21 -05:00
Hermès Bélusca-Maïto 2ebda0e3d0
[CONSOLE.CPL] Fix the console screen preview when selecting TrueType fonts.
CORE-13182 CORE-13196

- Use the correct character height & width.
- Additions: use StringCch*() when initializing the dialog title.

[CONSRV:CONCFG] Minor fixes.

- When retrieving font characteristics in ConCfgReadUserSettings(),
  check for NULL/zero values that indicate that we should use default
  ones instead.
- Rename 'dwNumSubKeys' into 'dwNumValues'.
2019-05-05 01:20:19 +02:00
Katayama Hirofumi MZ 262f712810 [WIN32SS][NTGDI] Correctly get/update ptlCurrent about TA_UPDATECP 2019-05-04 10:07:24 +09:00
Katayama Hirofumi MZ cb9a9fa984 [WIN32SS][NTGDI] Wrap IntLPtoDP and IntDPtoLP macros by do { .... } while (0) 2019-05-04 09:56:09 +09:00
jimtabor 2cc766b0c6 [NtGDI] Set Xform flags if a changed
Missed more flags changes.
2019-05-02 11:56:55 -05:00
jimtabor b2ce1ae206 [NtGDI] Set Xform flags if a changed
Missed flags changes.
2019-05-02 10:16:50 -05:00
jimtabor 04a04659da [NtGDI] Adding Support for Viewport TextOut
Add Viewport changes to Text Out Batch.
2019-05-02 10:11:11 -05:00
James Tabor 9d00413754 [GDI32] Add batch flag for Text Out
Set batch flag for Text Out with font and attributes change sets.
2019-05-01 23:24:53 -05:00
James Tabor 44b11ad6a9 [GDI32] Fix MS build
Fix old uncovered code.
2019-05-01 20:53:06 -05:00
James Tabor b751c31c74 [GDI32] Update signal flags for batch.
Add removed flags for batch signaling. This will allow syncing of
changed Xfroms after batched drawing. Disable calls to kernel mode since
the code is closely identical. Kernel calls are for init time when
PDCATTR is normally zero. ReactOS seems to work better keeping this from
NULL.
While making code changes add Xform state flags from:
https://www.reactos.org/archives/public/ros-diffs/2019-May/070693.html

Test BOT results:
https://reactos.org/testman/compare.php?ids=67251,67254
https://reactos.org/testman/compare.php?ids=67253,67255
2019-05-01 20:33:09 -05:00
Katayama Hirofumi MZ f7bc0543cb
[WIN32SS][NTGDI] Fix ExtTextOut about TA_UPDATECP (#1546)
Add WORLD_XFORM_CHANGED flag to some positioning functions.
Fix IntExtTextOutW function for TA_UPDATECP alignment, so that it can correctly update the current position. CORE-14994
2019-05-01 16:51:00 +09:00
Katayama Hirofumi MZ 8bdfdd5c17
[WIN32SS][NTGDI][GDI32] Fix DPtoLP and NtGdiTransformPoints etc. (#1540)
Fix NtGdiTransformPoints, gdi32!DPtoLP, gdi32!LPtoDP and gdi32!SetMapMode functions. Fix CORE-15983. CORE-15983
2019-04-29 14:45:44 +09:00
Hermès Bélusca-Maïto 0aed8b09a4
[CONSRV] Cache the console window system menu handle; simplify its initialization code. 2019-04-28 21:47:55 +02:00
Serge Gautherie cf48f8bf8a [REACTOS] Replace remnant legacy SPIF_SENDWININICHANGE by SPIF_SENDCHANGE (#1526)
No functional change otherwise.
2019-04-28 21:19:42 +02:00
Andrew Boyarshin 458a26ab76
[WIN32SS:NTUSER] Use the 2nd parameter of NtUserGetThreadDesktop() as fallback. (#1065)
- The 2nd parameter is already passed in user-mode by GetThreadDesktop().
  It is then used by NtUserGetThreadDesktop() as a fallback for console
  threads.

- Lookup and validate the thread by using the IntTID2PTI() helper.
- Don't reference the desktop with too many access rights.
- Get rid of the old-school DECLARE_RETURN() & co. macros.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2019-04-28 19:27:45 +02:00
Katayama Hirofumi MZ 23ad2173f2 [WIN32SS][NTGDI] Fix wrong IN/OUT (#1539) 2019-04-28 17:24:57 +02:00
Hermès Bélusca-Maïto d70848b8b7
[WINSRV] Implement SrvGetThreadConsoleDesktop(). CORE-13470
It retrieves the handle to the desktop assigned to the specified
thread belonging to a console application, which is going to be
where the input thread of this console is.
2019-04-28 02:50:38 +02:00
Katayama Hirofumi MZ 39312ba688 [WIN32SS][NTGDI] Use UNICODE_NULL for consistency 2019-04-27 16:17:37 +09:00
Katayama Hirofumi MZ 19fc9415bf
[WIN32SS][NTGDI] FireFox checkmark fix CORE-15303 (#1535)
The font size was a bit larger than expected. FireFox will show checkmarks correctly in View menu. CORE-15303
2019-04-27 09:38:01 +09:00
Katayama Hirofumi MZ ae8417fd90
[WIN32SS][NTGDI] Keep FontSubstitutes enumeration CORE-15785 (#1532)
Fix CORE-15785. When LOGFONT.lfFaceName[0] == 0, then enumeration of font substitutes had failed. CORE-15785
2019-04-26 21:56:36 +09:00
Bernhard Feichtinger f5471b7b4b
[NTOS][USERSRV] Silence noisy debug output. 2019-04-22 17:41:17 +02:00
Pierre Schweitzer 610cc5a6b6
[GDI32] Reduce verbosity on debug builds 2019-04-20 11:24:54 +02:00
jimtabor feb9c045cf [NtGDI] Update Region code
Wine Sync/Port and update for Regions. See CORE-15906.
2019-04-17 14:43:24 -05:00
jimtabor 7fabc51d73 [GDI] Fixup attribute support for Regions
Start to fix CORE-13817 when GDI batch is turn on for SelectClipRgn.
2019-04-17 14:09:58 -05:00
Hermès Bélusca-Maïto 61475b9fed
[WIN32SS:NTGDI] IntEscapeMatrix(): Use FreeType trigonometric functions instead of CRT ones. 2019-04-14 01:19:03 +02:00
Hermès Bélusca-Maïto 7334567211
[GDI32] Do not 'hard-assert' during the font-unit-test. 2019-04-14 01:17:15 +02:00
Katayama Hirofumi MZ 94a42d43b5
[WIN32SS][NTUSER] Fix message time (#1259)
Fix CORE-15565 and make #1245 GetMessageTime testcase successful. CORE-15565
- Erase MsqCalculateMessageTime function.
- Use (DWORD)EngGetTickCount() instead.
- Ghosting is temporarily disabled.
2019-04-12 07:56:04 +09:00
Katayama Hirofumi MZ 983cd57c1e [WIN32SS][NTGDI] Delete unnecessary (ULONG) cast CORE-15755 2019-04-11 18:23:32 +09:00
Katayama Hirofumi MZ bc9f3ed887
[GDI32][NTGDI] Avoid integer overflow (follow-up of #1492) (#1495)
Follow up of #1492. CORE-15755
- Use RtlULongMult function to check integer overflows.
2019-04-11 17:57:57 +09:00
Katayama Hirofumi MZ 811faed421
[GDI32][NTGDI][SETUP] Fix font enumeration part 2 (#1492)
Eliminate some bugs about font enumeration. CORE-15755

- Add "Microsoft Sans Serif" font substitution.
- Fix and improve the treatment of the nominal font names.
- Split IntGetFontFamilyInfo function from NtGdiGetFontFamilyInfo.
- Add DoFontSystemUnittest function for font system unittest to GDI32.
- Call DoFontSystemUnittest function at CreateFontIndirectW first call.
2019-04-11 11:46:52 +09:00
jimtabor cfdf36e442 [NtUser] Fix Theme Non Client Painting.
See CORE-7166 & CORE-15934.
2019-04-10 20:52:01 -05:00
Katayama Hirofumi MZ ae80eb824e
[GDI32] Improve IntFontFamilyListUnique function (#1491)
Make gdi32!IntFontFamilyListUnique function std::unique compatible. Previous code didn't set the first entry correctly. CORE-15785
2019-04-09 17:39:42 +09:00
Katayama Hirofumi MZ 672ac75033 [GDI32] add some DPRINT's for font enum functions 2019-04-09 16:44:57 +09:00
Maxim Smirnov ffb4b674c7 [FONT] Fix FontSmoothing 2019-04-07 01:42:29 +02:00
Jérôme Gardou e24182f8c0 [GDI32] Use correct dependenxy for the winegdi library 2019-04-06 17:43:38 +02:00
Jérôme Gardou 23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Adam Słaboń 7047aa80ef [TRANSLATION] Polish translation update
Polish translation update for calc, fltmc, magnify, notepad, osk, sndvol32, usetup, fdebug, appwiz, mmsys, sysdm, acppage, ziplfdr, browseui, cryptui, jscript, shell32, themeui and inf. Added translation for cyrptext, vcdcontroltool, and (not yet complete) getuname.
2019-04-05 10:34:10 +02:00
Katayama Hirofumi MZ 635534005b
[WIN32SS][FONT] Fix font coordinate conversion CORE-15907 (#1452)
[WIN32SS][FONT] Fix font bounding box mapping for viewport CORE-15907
2019-04-02 22:39:26 +09:00
Hervé Poussineau 0c4d21a5a1 Revert "[DXG] Define GUIDs only once", to fix MSVC build
This reverts commit 3a78dd4b31.
2019-04-01 18:00:59 +02:00
Hervé Poussineau 3a78dd4b31 [DXG] Define GUIDs only once 2019-04-01 11:38:32 +02:00
jimtabor 2f5c0ee0a9 [NtGdi] Fix assert with Winamp
Fixes CORE-10774.

Reference:
Alexandre Julliard : Ignore empty rectangles in ExtCreateRegion.
8ac61c5a1e
2019-03-31 13:31:59 -05:00
Bișoc George bd5fb32b79 [COVERITY][SPOOLSS] Fix a resource leak
Unload the library pointed by hWinspool when the function fails.

CID 1401149
2019-03-31 20:09:42 +02:00
jimtabor 0197c4f875 [NtUser] Fix maximizing to window edge
Cover up the edge of the frame while maximizing the window to desktop.
Fixes CORE-15893.
2019-03-27 17:39:04 -05:00
jimtabor 1f619b2781 [Win32SS] Fix maximized window positioning.
Fix CORE-5177 TaskMgr and ProcExp possionong when maximized.
2019-03-26 15:56:57 -05:00
Stanislav Motylkov 36230bb214 [USER32] Edit: Fix caret and scroll position
Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-15780
2019-03-24 23:26:20 +01:00
Hermès Bélusca-Maïto 048c8c1605
[USER32] Add support for navigating a group of radio buttons using a keyboard.
Import Wine commit:
b1b8fb77be

"user32: Add support for navigating a group of radio buttons using a keyboard.
The patch approximates the behaviour observed in the message tests
but still doesn't make the message tests pass without failures.
"
by Dmitry Timoshkov.
See bug report https://bugs.winehq.org/show_bug.cgi?id=16845
2019-03-24 17:23:33 +01:00
Hermès Bélusca-Maïto 780f2ba215
[USER32][COMCTL32] Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler.
CORE-8526

Import Wine commit:
96d0af52eb

"user32: Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler.
This patch also changes the logic to get the control style with WM_GETDLGCODE
instead of GetWindowLong to make the message test pass.
"
by Dmitry Timoshkov.
See bug report https://bugs.winehq.org/show_bug.cgi?id=42010

- (ReactOS-only) Fix also the corresponding logic in COMCTL32.
2019-03-24 17:23:24 +01:00
Baruch Rutman 7143e411c4
[GDI32] Integrate LpkGetTextExtentExPoint(). (#1362)
- Assume that GetTextExtentExPointWPri() uses the same kind of
  arguments as GetTextExtentExPointW().

- Add GetTextExtentExPointWPri() declaration to undocgdi.h.
2019-03-23 23:34:09 +01:00
Stanislav Motylkov 40dab7d5e5 [USER32] Edit: Fix rectangle overflow when inserting characters
Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-11475
2019-03-23 15:52:43 +01:00
jimtabor 68df5a50e6 [NtUser] Support SWP_FRAMECHANGED
Implement SWP_FRAMECHANGED support for non-changing window to force a
redraw.

Patch dedicated to Katayama Hirofumi MZ.
2019-03-18 17:28:33 -05:00
James Tabor b4624f32f3 [GDI32] Fix issue after a Flush
While flushing the DC handle goes down with the flush. This was not a
regression, just untested old code.
2019-03-14 12:00:53 -05:00
Hermès Bélusca-Maïto 0e56ec8892
[WIN32SS:NTGDI] Fix missing text in labels and buttons for .NET apps. CORE-15000
There was a missing break statement in ftGdiGetGlyphOutline().
Found by JIRA contributor 'I_Kill_Bugs' :-)

Add also brackets around 'case's to make code navigation easier.
2019-03-14 01:36:45 +01:00
jimtabor bc534efbc5 [User32] Support WM_COPYGLOBALDATA
Implement support for WM_COPYGLOBALDATA. Needs more tests.

Tested DropTest from CORE-15836.
2019-03-13 12:16:52 -05:00
Joachim Henze 76118320ea Revert "[FREETYPE] Fix 3 regressions in one patch"
This reverts commit 0.4.12-dev-856-g
98b7ecd280
CORE-15785, CORE-15558, CORE-15755.

As requested by Pierre, we have very strong indication, that it broke
https://build.reactos.org/builders/Test%20KVM and
https://build.reactos.org/builders/Test%20VBox
2019-03-12 18:57:21 +01:00
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