MFC42 applications only expect an IME window when on a DBCS system,
so they will capture this IME window as their 'main' window on non-DBCS systems.
CORE-18212
DLGWINDOWEXTRA is 30 (both on win32 and win64). This has storage for the following entries: DWLP_MSGRESULT (0), DWLP_DLGPROC (8), DWLP_USER (16)
We used to store the dialog info pointer using SetWindowLongPtr (DWLP_ROS_DIALOGINFO == DWLP_USER+sizeof(ULONG_PTR) == 24), which was fine on win32, but failed on win64, since there wasn't enough space left (24 + 8 = 32 > 30).
Rewrite the way the DLGINFO pointer is stored, by adding an additional field to the WND structure and set it using NtUserxSetDialogPointer (which is what it is for).
Also fix too small cbWndExtra for the button class.
CORE-15147
- Rename CLIENTTHREADINFO::tickLastMsgChecked into timeLastRead as
documented in https://reactos.org/wiki/Techwiki:Win32k/CLIENTTHREADINFO .
This is the last time the message queue was read.
- This is the structure member one must compare against the current tick
count timestamp in order to heuristically determine whether a message
queue thread is hung!! Fix MsqIsHung() in accordance, add extra debug
logging in order to help us determining which of our code present
regular GUI hangs, and add as well an extra "TimeOut" parameter so as
not to hardcode a fixed value within that function but instead
allowing its caller to specify possible different values.
- THREADINFO::timeLast is on the contrary the last message time stamp,
and will definitively differ from CLIENTTHREADINFO::timeLastRead .
It should only be used for information purposes!
- Accordingly, in NtUserGetThreadState()::THREADSTATE_UPTIMELASTREAD
and in InitThreadCallback(), only (re-)initialize the timeLastRead
member of the CLIENTTHREADINFO structure of the THREADINFO of interest.
- In co_IntPeekMessage(), update more often the timeLastRead timestamp
whenever the current message queue has been read (but NOT timeLast!!
That one will be updated ONLY WHEN a message is found!).
- In co_IntSendMessageTimeoutSingle() first check whether the window to
which we send the message is being destroyed, before checking for
queue hangs etc. Collapse the logic checks for queue hang and increase
the hang timeout check to 4 times MSQ_HUNG (== 4 * 5 seconds) and
display a debug trace.
- 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.
- 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.
- Implement user32!SwitchToThisWindow by NtUserCallTwoParam TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW.
- Improve user32!CloseWindow with using SetActiveWindow and ShowWindow (synchronized).
CORE-15165