CORE-11933 and PR #621.
We are potentially going to modify the window station name to be
created or opened, by one with the format "Service-0x<luidhigh>-<luidlow>$",
in case the user provides an empty name.
Since we want to use the user-mode ObjectAttributes structure pointer so
that the Object manager can correctly perform the access checks and the
capture, we actually need to construct the new window station name in the
user memory space! This allows us then to fetch the new name in the
ObjectAttributes structure so that Ob can use it.
All of this is performed under SEH.
For NtUserOpenWindowStation(), we also need to be Windows-compatible and
detect whether user-mode gave instead the special "Service-0x00000000-00000000$"
name (observed via API monitoring) that is used when one tries to open a
window station with empty name.
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().
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.
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
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).
- 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.
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
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.
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.
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.
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
Refactor the font engine code in "win32ss/gdi/ntgdi/freetype.c".
- Add "g_" prefix to global variables.
- Make the locking macros function-like.
CORE-13065
Introduce BiDi (bi-directional text) support for ExtTextOut and GetCharacterPlacement, using Wine's GDI BIDI_Reorder function.
Solves the main issue with CORE-7003.
To be compatible with Win2k3+, introduce the "Language Pack" (LPK) dll.
- All the bidi code is removed from gdi32 and replaced by calls to LPK.
Gdi32 uses dynamic linking to lpk.dll. In case of linking failure no bidi processing will be available.
- Implemented LpkGetCharacterPlacement.
- Implement LpkExtTextOut.
- Add a demo test program to show how the apis should function.
- Added all the remaining code, added special case for lpDx calculation if also GCP_GLYPHSHAPE flag was called.
Applications that call GCP that use GCP_GLYPHSHAPE flags should also use the GCP_REORDER flag.
(As written in https://msdn.microsoft.com/en-us/library/windows/desktop/dd144860(v=vs.85).aspx )
- Add ETO_RTLREADING flag handling.
Imported the ETO_RTLREADING flag handling from wine, which changes the string part order (runs).
A RRR1LLLRRR2 string without will show as RRR1LLLRRR2 without it, with it RRR2LLLRRR1.
CORE-13447 CORE-14422
This fixes closing nLite 1.4.9.3 (.NET2) application, as well as any
other program that expects that the interactive window station is
reported as being visible. I thank Mark Jansen and Joachim Henze for
help and testing.
- "warning: comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]"
- "warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]"
CORE-14306
Variable 'Status' would be set but not used otherwise in this case.
This commit will not fix or improve CORE-13278,
but was spotted when having a look at that.
This nice patch of Jerome Gardou improves palette
when VBEMP & inbuilt Mesa is used for
Diablo II, MS Age Of Empires 1, Anno 1602
to the state we had in SVN r75060 and below.
We already committed this fix into 0.4.8-release before.
- Use a more descriptive "unknown hard error" string than Windows' one.
- Improve the computation of the buffer size for the hard error message
by using _vscwprintf() instead of just "guessing" which size the fully
printf'ed message could be.
- In UserpCaptureStringParameters(), always capture the parameter
strings with a terminating NULL. Also, no need to convert them to
ANSI if they are used with a STATUS_SERVICE_NOTIFICATION message.
- Determine within UserpFormatMessages() the message box flags to be
used, either from the message parameters (if STATUS_SERVICE_NOTIFICATION)
or from the proposed response options and message status severity.
These flags are then used by both UserpShowInformationBalloon()/UserpShellHardError()
and by UserpMessageBox().
- Improve Message validation (especially for STATUS_SERVICE_NOTIFICATION).
- Try to display the hard error status number if it's an unknown one.
- Make UserpFormatMessages() always succeed by falling back on
static string buffers if allocating large string buffers fail due to
lack of memory. Then the hard error popups will have truncated
strings, but at least something will be displayed instead of nothing,
thus alerting the user that something went wrong anyway.
- Simplify a bit the code by moving the NtOpenProcess(),
UserpCaptureStringParameters() and UserpFreeStringParameters() calls
inside UserpFormatMessages(). This also allows simplifying its
prototype.
- Cache localized hard error message components: the status severity,
the system process name and the unhandled exception debug strings.
- Try not to fail too much. In particular, don't fail if a string could
not be correctly captured in UserpCaptureStringParameters() (we then
use a default empty string). The next aim is to make UserpFormatMessages()
not failing at all.
- Use RtlStringCbPrintf(Ex)W where possible so that one can use counted
(and not NULL-terminated) UNICODE_STRINGs where possible. This allows
using counted resource strings without having to allocate memory.
- If available, prepend the window title of the application that
triggered the hard error to the hard error message box caption.
In particular do not always fail as soon as there is an error, because they may be the sign of an OS problem and this is precisely in this case that we want to display a hard-error.
- Use hard-error captions depending on the status code severity.
- Improve handling of the STATUS_UNHANDLED_EXCEPTION error. Start
implementing the display of the dialog button descriptions ("OK" to
terminate the application; "Cancel" to debug the application).
- Add support for the "ErrorMode" and "ShellErrorMode" registry values
under HKLM\System\CurrentControlSet\Control\Windows.
- Use MessageBoxTimeoutW() in UserpMessageBox() to support different
message box timeouts.
- Log hard errors into the System event log.
- Fix a copypasta.
- Remove dead code.
Thanks to mudhead, who spotted most of these.
NB:
This EXPERIMENTAL_MOUSE_CURSOR_SUPPORT code isn't compiled by default since r7865.
CORE-14511
SendNotifyMessageW: It doesn't support messages with pointers so there is no need to call MsgiUMToKMMessage
SendMessageTimeoutW, SendMessageTimeoutA: These two do support marshaling pointers so they need to use MsgiUMToKMMessage.
This is actually a bug that happens only in the rare case where we send a WM_COPYDATA with a timeout.
PDBs reveal that these functions are also used in winspool.drv, but not imported from spoolss.dll to retain the client/server architecture.
As winspool.drv highly benefits from the MarshallUp* functions, I put them in a source file shared between spoolss.dll and winspool.drv.
The added API Tests cover my testing and all implemented features.
One more item done from https://reactos.org/wiki/Printing !
This reverts ea4daf8b68 committed 2017-12-09 to master, the commit was named
"[WIN32K] Fix NtGdiGetTextFaceW to report face name correctly (#173)",
reverting got ack of khmz,
reopening less severe CORE-14071 accordingly
Yes, it checks the input handle and doesn't fail if an invalid level is given, because someone may still send a Command.
This also fixes CORE-12794. Thanks for reporting!
We applied this patch also last second in 0.4.7rls, now in master.
IntTrackPopupMenuEx() caused the BSOD when called while window is in the process of being destroyed.
* Pass the correct handle to _RpcGetPrinter in GetPrinterW.
* Pass an empty string instead of a NULL pointer as wszComputerName to the GetPrinterLevel* functions, because this variable is later used as source for StringCbCopyExW.
* Don't check for GetLastError() == ERROR_SUCCESS in tests. Windows apparently only sets the last error in case of failure.
The Printing code should probably be changed similarly in a future commit.
Should fix CORE-14072
This may get more applications to work which previously called into the WINE-generated stubs (that throw an exception).
It also improves debug logs when the "winspool" debug channel is enabled. With such detailed debug logs, we may get an idea which winspool APIs need to be implemented sooner than others.