Commit graph

151 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 43e2ab208a
[WIN32K:NTUSER] Get rid of the cached window station Name member, and instead just use the name stored in the NT Object's header.
CORE-11933 and PR #621.

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

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

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

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

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

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

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

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

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

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

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

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

CORE-14318, CORE-13157
See also: CORE-14806 and CORE-8723
2018-07-13 10:34:42 +02:00
Katayama Hirofumi MZ cc3ba6e41c [USER32][WIN32SS] Improve CascadeWindows function (#677)
If the window is too large, then shrink it if possible.
CORE-14807
2018-07-09 14:52:30 +02:00
Katayama Hirofumi MZ 4e45a91547 [USER32][WIN32SS] Implement CascadeWindows function (#676)
CORE-14807
2018-07-09 01:51:14 +02:00
Hermès Bélusca-Maïto 25004bb5b4
[WIN32K:NTUSER] Remove the hackish code that has been introduced in IntSendChildNCPaint() in r73532 (6d7fcc4b) to attempt to pseudo-fix CORE-12071 and CORE-12085 while breaking other stuff, amongst which CORE-14763 is one of the latest manifestations, and re-enable the correct original code.
This fixes painting hangs under diverse situations, while CORE-12071 and
CORE-12085 remain fixed.
2018-07-08 15:39:50 +02:00
Hermès Bélusca-Maïto ee0511b49d
[WIN32K:NTUSER] Add diagnostic asserts in IntLinkWindow() and IntUnlinkWindow(). Don't link a window to itself in IntLinkWindow()! Add diagnostic traces for this situation, as well as in IntLinkHwnd().
Helps in correctly fixing CORE-12071 and CORE-12085.
2018-07-08 15:39:50 +02:00
Hermès Bélusca-Maïto 4d057cf626
[WIN32K:NTUSER] Formatting only! 2018-07-08 15:39:48 +02:00
Katayama Hirofumi MZ 6abc9f5b5a [WIN32SS] Fix NtUserGetClipboardData for text paste (#645)
Fix the NtUserGetClipboardData function for the synthesized text formats (CF_TEXT, CF_OEMTEXT and CF_UNICODETEXT).
CORE-11471
2018-06-30 17:12:23 +02:00
Timo Kreuzer 2170901e6a [WIN32K] Implement RECTL_bClipRectBySize() and use it in IntEngBitBlt() to clip the target rect against the bounds of the target surface. Also clip the source rect against the source surface. Fixes remaining part of CORE-14463 2018-06-30 16:40:04 +02:00