Commit graph

689 commits

Author SHA1 Message Date
Katayama Hirofumi MZ fa264251a7 [USER32] Check whether the window is minimized upon SM_REPOSITION CORE-16490 2019-11-19 10:32:06 +09:00
Katayma Hirofumi MZ f981a68ee0 [USER32] Improve DM_REPOSITION CORE-16490 2019-11-16 12:52:40 +09:00
Katayma Hirofumi MZ 657887adf4 [USER32] Fix DM_REPOSITION (rc.bottom minus 4) 2019-11-16 11:21:16 +09:00
Katayama Hirofumi MZ 8249d2a3fa
[USER32] Implement DM_REPOSITION message (#2020)
DM_REPOSITION is dialog message that can reposition the dialog to the workarea when the dialog is partially/entirely in outside of the workarea. CORE-16490
2019-11-16 09:51:16 +09:00
Katayama Hirofumi MZ 462b1b7444
[NTUSER] Support MK_SHIFT/MK_CONTROL of mouse messages (#2038)
Upon mouse message generation, The states of Shift key and/or Ctrl key must be used. If Shift key is pressed, it enables MK_SHIFT flag of the mouse message. If Ctrl key is pressed, it enables MK_CONTROL flag of the mouse message. CORE-16279
2019-11-16 09:49:49 +09:00
Joachim Henze 19fbdda95c [WIN32SS] Prevent disabled scrollbars being clickable CORE-15557
Thanks to JIRA user 'I_Kill_Bugs.

VBox: https://reactos.org/testman/compare.php?ids=69671,69747
KVM: https://reactos.org/testman/compare.php?ids=69672,69748
2019-11-09 15:50:50 +01:00
James Tabor 34b4b96461 [User32] Properly handle WM_CTLCOLOR* messages.
Patch by Fabian Maurer : Properly handle WM_CTLCOLOR* messages.

See CORE-15560 and
fbec0ba9ee
.

Added support for module versions.
2019-11-06 21:43:00 -06:00
Hermès Bélusca-Maïto 3b2f158593
[NTOS][CLASS2][FFS][WIN32SS] Fix some pool tags so that they correctly appear in pool dump lists.
Reminder: in the code they are defined using reverse byte order
(Windows/ReactOS are little-endian OSes).
2019-11-01 19:12:27 +01:00
Katayama Hirofumi MZ b3033b81a4
[WIN32SS][NTUSER][USER32] Fix menu checkmarks (#2009)
CORE-16470
The checkmarks of menu were black boxes. This PR will fix drawing.
- Don't change background mode.
2019-11-01 09:52:18 +09:00
Joachim Henze 9e14a762d5 [WIN32SS] Fix last user visible parts of regression CORE-10855
When Themesvc was disabled, some Window titlebar
frames were drawn too thin until the window
was actively resized in y by the user.

That and similar symptoms started to show up after SVN r68904 ==
6dfa71c487

Many thanks to patches author Doug Lyons.

We leave the ticket unresolved still due to explicit request of
James Tabor, who wants to continue working in that context.

I will merge that back into 0.4.13RCs as well.
2019-10-25 00:42:01 +02:00
Katayama Hirofumi MZ 6fc6e3c398 [WIN32SS][NTGDI] Unite duplicate of condition 'UsesSource' 2019-10-22 09:33:32 +09:00
Katayama Hirofumi MZ 1bf982ff88 [WIN32SS][NTGDI] 'otm' is always non-NULL in epilogue 2019-10-22 09:29:15 +09:00
jimtabor 333b8f19a4 [GDI32] Update Gdi Driver Header.
Patch by : Akihiro Sagawa : Implement GetCharWidthInfo().

1128587fd2
2019-10-18 23:49:13 -05:00
Mark Jansen e1984d03b4
[WIN32K:menu] Use signed types for negative values...
CORE-16306
2019-10-12 16:19:58 +02:00
Joachim Henze 96ef605f4b [WIN32SS] Fix regression CORE-16393
Symptom "cmd did not hide the taskbar anymore when switching to fullscreen"

It regressed by SVN r75407 == git
09ab5ea7ed

VBox LGTM https://reactos.org/testman/compare.php?ids=69295,69297
 KVM LGTM https://reactos.org/testman/compare.php?ids=69296,69298

Many thanks to the patches author James Tabor.
2019-10-11 23:21:39 +02:00
Stanislav Motylkov 297abde716 [FREELDR][XBOXVMP] Retrieve screen resolution directly from NV2A GPU (#1962)
CORE-16216
2019-10-09 23:27:22 +02:00
Stanislav Motylkov b3301df570 [XBOXVMP] Fix broken pixels and general refactoring (#1896)
- Remove old hacky code based on MmHighestPhysicalPage.
- Split I2C SMBus code into a separate source file.

CORE-16216 CORE-16357
2019-10-08 17:08:44 +02:00
James Tabor 1f78e8ec47 [Win32SS] Support Module Versioning.
Set the appropriate flags supporting versions of software modules.
Fix arguments for getting desktop DC.
2019-09-24 17:40:18 -05:00
James Tabor c57d4d7b9e [User32|Tests] Sync Port Wine Combo Controls.
Need to cross check these changes with WINE ComCtl32 before you PANIC
HACK!!!!

Not in order:
Piotr Caban : Remove unneeded RECT parameter from CBPaintText helper.
              Don't invalidate ComboBox on CB_SETCURSEL message.
Don't invalidate ComboBox on LBN_SELCHANGE and
LBN_SELCANCEL.
              Add more CB_SETCURSEL tests on ComboBox.
              Redraw combo text field even if it's empty.
Let ComboBox edit control handle the redraw even if
CBF_NOREDRAW is set.
Don't do the painting if combobox is not visible in
CBPaintText.

Dmitry Timoshkov : Don't force a combobox repaint on WM_SIZE.

This breaks z-order based painting and causes side effects
for
applications that during the WM_PAINT processing reference
internal
             data associated with a not fully initialized window.
Ref :
2d9e3236ea

Fabian Maurer : Set listbox popup height correctly and add tests.

                Properly set dropdown height.

             Now that user32 and comctl32 combo are separated,
             this won't lead to a regression anymore
             Ref :
3d0be0bad8
             Info by Sebastian Lackner Ref:
f0fc034997

Nikolay Sivov : Remove some misleading TODOs and confusing comments.
2019-09-21 08:47:56 -05:00
Katayama Hirofumi MZ 81e27f0be7
[WIN32SS][NTUSER] Fix hit test position of popup menu
The submenu of desktop popup menu was erroneously shown at first right click.
- Fix the hit test position that was modified by window style change.
CORE-16382
2019-09-21 18:21:17 +09:00
Stanislav Motylkov b16ca9cd65 [WIN32SS][NTUSER] Fix debug print in winpos.c (#1893) 2019-09-12 15:53:29 +02:00
Katayama Hirofumi MZ b81f9b0842
[WIN32SS][FONT] Fix registry-based management (#1879)
CORE-16269
- Fix and improve registry-based font entry management.
- Append style name to registry value name.
- Make some DPRINT DPRINT1 (noisy).
2019-09-10 20:39:52 +09:00
jimtabor 6f353f7747 [Win32SS|Eng] Update stubs.
These functions are no longer support for UMPD.
2019-09-04 13:09:34 -05:00
jimtabor 3ca67d97e2 [Win32SS] Fix safe pointer and define type. 2019-09-03 15:02:46 -05:00
jimtabor c698eff041 [Win32SS] Implement EngCreate/DeletePalette.
Safe to be called from user side without UMPD support.
2019-09-03 14:36:20 -05:00
Stanislav Motylkov b54a38b8c0 [XBOXVMP] Improve debugging prints 2019-09-01 23:01:57 +02:00
Stanislav Motylkov 816149e0c3 [XBOXVMP] Code formatting only 2019-09-01 23:01:57 +02:00
Stanislav Motylkov 32fb2e7b5f [VIDEOPRT] Fix uninitialized Reserved bit field in PciSlotNumber
CORE-16317
2019-08-31 00:19:03 +02:00
Stanislav Motylkov 8c36145087 [XBOXVMP] Add Xbox video miniport driver
Also make XboxVmp driver compatible with Video Port driver, specify
vendor id and device id explicitly in VideoPortGetAccessRanges() call

CORE-16317
2019-08-31 00:19:03 +02:00
Jose Carlos Jesus d5dca45e51 [WIN32SS][USER][EXPLORER] Add/Update portuguese translation (#1882) 2019-08-26 21:01:41 +02:00
Victor Perevertkin 09abc443b1 [VIDEOPRT] Fix RtlCopyMemory sizeof usage
Spotted by GCC8
2019-08-20 15:05:47 +02:00
Joachim Henze 4193b8d8ac [WIN32SS] WindowSnap must not affect the taskbar
This fixes regression CORE-16289 where we could not longer
move the taskbar at a different than default location,
as WindowSnap would interfere.

Many Thanks to the patches author Doug Lyons.

Eventually the heuristic that we use here to identify the
taskbar via used window-styles could be improved later.
Theoretically possible that it bails out on some other windows.

The regression was introduced by 0.4.12-dev-373-g
7e396787ed
2019-08-20 12:07:56 +02:00
James Tabor d48345a0ee Update Headers for Printing and Other
Add missing flags and function types. Fix typos.
2019-08-15 21:39:26 -05:00
Timo Kreuzer 93028748c9 [VIDEOPRT] Fix order of some exports 2019-08-15 18:04:57 +02:00
Timo Kreuzer 21c9f2a488 [WIN32K] InitVideo() should return NTSTATUS, so return STATUS_SUCCESS instead of 1 2019-08-15 18:04:57 +02:00
Timo Kreuzer 7611cc2b12 [REACTOS] Fix SIZE_T related warnings 2019-08-15 14:20:00 +02:00
Timo Kreuzer 826704ba6b [VIDEOPRT] Implement support for INT10 on x64 using the newly implemented HAL functions. 2019-08-15 14:13:54 +02:00
Timo Kreuzer eba27d5856 [VIDEOPRT] Fixes for x64 2019-08-15 14:13:54 +02:00
Timo Kreuzer 832f8863be [VIDEOPRT] Call IntInt10CallBios from VideoPortInt10, instead of code duplication 2019-08-15 14:13:54 +02:00
Timo Kreuzer e7b3c66a42 [VIDEOPRT] [FORMATTING] No code change 2019-08-15 14:13:54 +02:00
Katayama Hirofumi MZ b863ecc33f
[WIN32SS][NTUSER] Fix menu drawing after style change (#1821)
There were menu drawing regression after 03adec8141.
This PR will fix it. CORE-16244

- We don't have to draw the frame manually because of WS_EX_DLGMODALFRAME extended style.
- We don't need the margins (MENU_TOP_MARGIN and MENU_BOTTOM_MARGIN) in the client area any more because the client area doesn't contain the frame width.
- Use GetSystemMetrics(SM_CXDLGFRAME) and GetSystemMetrics(SM_CYDLGFRAME) for frame width.
2019-08-11 07:46:14 +09:00
Katayama Hirofumi MZ 03adec8141 [WIN32SS][NTUSER] Fix popup menu freezing 2019-08-10 15:40:32 +09:00
Katayama Hirofumi MZ 2b526bceac
[WIN32SS][NTGDI] Registry-based font management (#1816)
CORE-16269
- Add IntGdiAddFontResourceEx function that is extended from IntGdiAddFontResource, in order to add dwFlags parameter.
- Add IntLoadFontsInRegistry function that will load the fonts from registry info.
- If loading from registry failed, IntLoadSystemFonts will be called.
- Use IntLoadFontsInRegistry rather than IntLoadSystemFonts in the OS startup.
- Add NameFromCharSet function.
- Append " (CharSetName)" to registry value name if not TrueType.
2019-08-10 14:52:09 +09:00
Katayama Hirofumi MZ 0749a868fc
[WIN32SS][NTUSER] Fix popup menu window styles (#1814)
Fix the class style, the window style and the extended style of the popup menu window. CORE-16244
2019-08-10 08:33:25 +09:00
Mark Jansen 6948764b21
[WIN32SS] Ensure the last menu item is not accidentally selected when a system menu is off-screen
CORE-16297
2019-08-08 19:51:28 +02:00
Mark Jansen 84e263ceb2
[WIN32SS] Do not propagate TPM_VERTICAL to sub-menus
With this change we can remove the workaround from the off-screen
menus dropping below their parent.
Many thanks to Joachim for his help debugging / testing this.

CORE-16297
2019-08-08 19:51:28 +02:00
Mark Jansen 1c8cdaa470
[WIN32SS] Fix tray popup menus stuck to the bottom of the screen
Dedicated to Joachim
CORE-16297
2019-08-08 19:51:28 +02:00
Mark Jansen 33f77af348
[WIN32SS] Fix off-screen menu's dropping below their parent 2019-08-08 19:51:28 +02:00
Mark Jansen 3cbdcc6363
[WIN32SS] For application menu's, only exclude the menu item,
not the entire window.
Because the application menu is part of the application window,
this would lead to bad results.
2019-08-08 19:51:15 +02:00
Katayama Hirofumi MZ 65e4efd475
[WIN32SS][NTUSER] Fix MENU_DrawScrollArrows (#1753)
Fix drawing the menu scrolling arrows. CORE-13211
2019-08-08 13:56:23 +09:00
Doug Lyons c1ec0d92e2
[WIN32K:NTGDI] Fix ASSERTS in REGION_bXformRgn. CORE-15992 2019-08-07 07:47:47 +02:00
Mark Jansen b5c6af459c
[WIN32SS] Exclude the entire menu from overlapping, not just the menu item
CORE-15863
2019-08-06 21:17:47 +02:00
Mark Jansen 7c45a646e9
[WIN32SS] Iteratively mutate menu flags until we find a 'best fit'
CORE-15863
2019-08-06 21:17:47 +02:00
Mark Jansen a59df3858c
[WIN32SS] Rewrite MENU_ShowPopup to take the exclude rectangle into account
CORE-15863
2019-08-06 21:17:35 +02:00
Katayama Hirofumi MZ 4414f45cc0
[WIN32SS][NTUSER] Fix default menu item font weight (#1804)
CORE-16294
We had added "Arial Black" font, so a request for heavy weight font will be realized as it is. This PR will fix font weight (FW_*) calculation of default menu items.
2019-08-05 23:16:01 +09:00
Katayama Hirofumi MZ 9cd11eb103
[WIN32SS][NTGDI] Fix condition of bold emulation (#1787)
- Define EMUBOLD_NEEDED macro to determine the condition of bold emuration necessity.
- Use this macro.
- Loose the condition.
2019-08-04 15:15:52 +09:00
Mark Jansen c057a07d79
[WIN32SS] Improve font loading failure logging 2019-08-04 01:55:18 +02:00
Mark Jansen 35dc022e14
[WIN32SS] Only access a font face if it was actually loaded 2019-08-04 00:41:12 +02:00
Katayama Hirofumi MZ 7547757892
[WIN32SS][NTGDI] Improve IntGetOutlineTextMetrics (#1760)
Improve size checking of IntGetOutlineTextMetrics function.
2019-08-02 20:28:30 +09:00
Katayama Hirofumi MZ 6642dbc470
[WIN32SS][NTGDI][NTUSER] Make gusLanguageID USHORT (#1776)
Every language ID is an unsigned integer.

- Make gusLanguageID unsigned.
- Make the return value type of UserGetLanguageID unsigned.
2019-07-31 22:24:01 +09:00
Katayama Hirofumi MZ 7c9755b47d
[WIN32SS][NTGDI] Fix and improve font dumping (#1768)
Fix and improve font dumping. CORE-16245
- FontGDI->FontObj is not a pointer.
- "%s" does null check, so we remove redundant null checks.
- Add FaceName and StyleName dumping.
2019-07-30 18:15:56 +09:00
jimtabor 02db01f3a6 [NtGDI] Fix one size region test.
See CORE-16246, the clip region may be the same size but more complex
than the callers simple region.
2019-07-29 13:02:07 -05:00
Hermès Bélusca-Maïto 8831328081 [USER32] Fix build after 51d031cc ; addendum to f21871fb (r69249) and cf98f01e (r72650). CORE-10194 2019-07-29 01:38:43 +02:00
Hermès Bélusca-Maïto 51d031cc5d
[USER32] Use the correct __REACTOS__ define. 2019-07-29 00:33:20 +02:00
jimtabor 665871527b [GDI32] Allow functions to access printing support.
Reapplying lost committed code.
2019-07-27 14:15:42 -05:00
jimtabor 4563ca28d3 [GDI32] Add more to Local DC structure.
Make the two structures identical. These are used for printing and
enhanced metafile support.
2019-07-27 14:13:14 -05:00
Timo Kreuzer 08c6d21e1f [REACTOS] Fix warning C4146: unary minus operator applied to unsigned type, result still unsigned 2019-07-27 11:21:28 +02:00
Joachim Henze 64e182e429 [WIN32SS] Addendum to font alignment CORE-16133
addendum to 0.4.13-dev-707-g
0e4db883e5

Jim Tabor intended to structurally use flTextAlign over
lTextAlign internally within IntExtTextOutW().
He initially committed these changes in 0.4.12-dev-805-g
3377fe184e

But we unintentionally lost these changes via 0.4.13-dev-370-g
8f482af0a8

Many thanks to Doug Lyons who helped a lot with fixing CORE-16133.
2019-07-27 10:00:42 +02:00
Katayama Hirofumi MZ 0e4db883e5 [WIN32SS][NTGDI] text/font vertical alignment patch CORE-16133
Based on Doug Lyons' patch. It partially fix CORE-16246 and CORE-16133.
Selection area is not fixed yet.
2019-07-26 19:13:00 +09:00
Katayama Hirofumi MZ 1e91a1690d
[USER32][NTUSER] Fix menu arrow drawing (of DrawFrameControl) (#1752)
CORE-13211
user32!DrawFrameControl drawed invalid menu arrow when the width is shorter than the height.

- Use the squared rectangle.
- Draw it in the transparent background mode.
- Save the old background mode of HDC.

This PR will fix UltraISO's bug.
2019-07-25 01:40:33 +09:00
Katayama Hirofumi MZ 31d616ff73
[WIN32SS][GDI] Assume pso->sizlBitmap.cy positiveness (#1743)
We assume pso->sizlBitmap.cy is positive. CORE-15995

Because pso->sizlBitmap.cy is certificated as a positive value after initialization in SURFACE_AllocSurface, so we can safely omit abs and labs (absolute) function calls for it.
2019-07-21 21:39:05 +09:00
Katayama Hirofumi MZ 023794c7c1 [FONTS][NTGDI] Change Marlett.ttf charset and delete charset hacks 2019-07-21 12:59:06 +09:00
Hermès Bélusca-Maïto 3de67cec24
[WIN32K:NTGDI] Improve allocated resources cleanup in failure paths of IntGdiLoadFontsFromMemory().
- Use an auxiliary list where we add the new enumerated faces, for easy
  roll-back in case a failure happens during font loading. Only at the
  very end when font loading has been successfully done, the auxiliary
  list is appended to the corresponding global or per-proceess font list.

- Perform actual cleanup in case of failures.

- Introduce CleanupFontEntryEx() helper to simplify cleanup in
  IntGdiLoadFontsFromMemory() in failure paths; implement
  CleanupFontEntry() around it.

Additions:

- Perform string buffer NULL check in IntGdiAddFontResource().
- Reorder memory unmapping and section object dereferencing in
  IntGdiAddFontResource().
- Move DuplicateUnicodeString() upwards.
- Mark explicitly the Marlett font handling hacks.
2019-07-21 01:01:41 +02:00
Katayama Hirofumi MZ ae99df1675 [WIN32SS][NTGDI] Support raster fonts (*.fnt and *.fon) (#1739)
Add raster font (*.fnt and *.fon files) support. CORE-16165

- Add IntGetCharSet() function to get the charset by index and/or the number of charsets.
- Make IntGdiLoadFontsFromMemory() a non-recursive function.
- IntGetOutlineTextMetrics() accepts raster fonts.
- Improve CharMap handling (especially TT_PLATFORM_APPLE_UNICODE).
- Write the raster font file info to the registry.
- Don't request font size for raster fonts in IntRequestFontSize() function.
2019-07-20 16:47:29 +02:00
Joachim Henze b5478a7873 [WIN32SS][FREETYPE] Fix performance regression FreeBASIC console output CORE-16177
By restoring historic state of GreExtTextOutW() / IntExtTextOutW()

This reverts guilty rev 0.4.12-dev-190-g
d6cfeaef51
as well as some follow ups that dealt with new errors popping up afterwards.
The revert got ack of Katayama Hirofumi MZ.

Test VBox on master: https://reactos.org/testman/compare.php?ids=68471,68475
Test KVM on master: https://reactos.org/testman/compare.php?ids=68472,68476

Analog revert was applied before to 0.4.12-RC-42-g
021f498cb2
2019-07-07 20:50:30 +02:00
Katayama Hirofumi MZ c17a8770a3
[USER32] Switch to only one window (Alt+Tab) (#1718)
Fix app switcher (Alt+Tab)'s behavior when there is only one app window. CORE-16176
2019-07-07 09:05:10 +09:00
Bernhard Feichtinger 774246e95c [WIN32SS][GDI] Improve stub for EngQueryDeviceAttribute 2019-06-30 23:50:20 +02:00
jimtabor a8d6e12bc1 [User32] Sync Port Wine.
Patch :
Nikolay Sivov : Use correct brush color for centered image background.
Nikolay Sivov : Remove confusing comments.
2019-06-28 22:22:49 -05:00
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
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