Fixes accessing nullptr / invalid handle in Window->SystemMenu
I could trigger this occasionally when moving Opera 12.18 window
in front of Spotify 1.0.29.92 window.
Fix was:
authored by Thomas Faber (Thank you!)
tested by me
reviewed by James Tabor
LibreOffice started to show GUI in a mono-spaced font after 0.4.10-dev-466-g
35f62fc5ba
We can fix this by partial revert
as proposed by Katayama Hirofumi MZ, who was author of those changes as well.
We revert the changes in penalty system here.
- Try to make use of ScriptStringCPtoX when trying to fill the lpCaretPos struct member;
if USP10 error happens fallback to the unreorder method.
- Remove now incorrect debug print.
Google Chrome with -no-sandbox parameter in ReactOS wouldn't display the web page because first-chance exception raised.
CORE-14926
- Remove FullName, Style, and FaceName members from TEXTOBJ structure.
- Add TextFace member into TEXTOBJ structure.
- Add MatchFontName() and MatchFontNames() helper functions.
- Fix GetTextFace() and related.
Added callback function that redirects calls to GreExtTextOutW that didn't went through lpk BiDi processing, calls that are from the kernel.
Completely solves JIRA issue CORE-6910.
Normally CSRSS must not be connected to any winsta or desktop by default. It should manually connect
to a winsta/desktop only when it has to do some GUI operations, and then disconnect afterwards.
[USERSRV] Temporarily hackfix the harderror dialog display to the current input desktop.
as documented in "Advanced Windows NT" by Jeffrey M. Richter (Microsoft Press),
and in https://is.muni.cz/el/1433/jaro2010/PB167/um/cv5/undocumented_CreateProcess.pdf .
[INCLUDE][SERVICES][WIN32K:NTUSER] Add an undocumented STARTF_INHERITDESKTOP flag
for the STARTUPINFO::dwFlags structure member, whose purpose is to tell Win32k
that the created handles to the window station and desktop to which the
process is connecting to, can be inherited by its child processes.
It is used when starting interactive services.
Observed via API monitoring on Windows 2003.
CORE-11933 and PR #621.
Since this API is also called from WINSRV when calling the AllocConsole() API,
it can be tested more-or-less easily. The internal helper IntResolveDesktop()
is also tested during process connection to a window station, when such process
first calls a USER32 or GDI32 function.
This is also the functionality tested by the user32:desktop apitest.
- Adjust how IntResolveDesktop() is called.
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.