Fixes "True Reporter. Mystery of Mistwood" broken startup from launcher when the launcher wants to minimize all windows (which is probably not strictly necessary) but we instead pop Start menu.
--
v2: explorer: Don't pop start menu on "undo minimize all windows" systray command.
explorer: Don't pop start menu on "minimize all windows" systray command.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5025
It's possible that a state object pointer not in the topology node collection gets passed to
session_get_node_object(). Instead of returning the last node when the object is not found, we
should return a NULL so that the state of the last node is not changed by mistake.
--
v11: mf/tests: Test IMFMediaSession::Start().
mf: Support seeking while a session is started.
mf/tests: Add a create_test_topology() helper.
mf: Add a session_flush_nodes() helper.
mf: Make session_get_node_object() more robust.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3572
The IVideoWindow_put_Visible runs the NtUserShowWindow which may trigger the VideoWindow_NotifyOwnerMessage with a WM_PAINT message and afterwards try to send a WM_ERASEBKND. This will cause the VideoWindow_NotifyOwnerMessage to be stuck waiting on the lock. This causes a deadlock because the IVideoWindow_put_Visible is never able to return, as it is waiting for the WM_ERASEBKND message to go through in the send_erase function, which can only go through once the WM_PAINT has returned.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5023
Theoretically, this allows debuggers to tell them apart. https://devblogs.microsoft.com/oldnewthing/20110429-00/?p=10803
But in practice, this is more about cleanliness than anything else; I'm not aware of anyone running SetLastError-aware debuggers in Wine. Feel free to reject if this is a waste of time.
The changeable SetLastError calls were found by this script:
```python
#!/usr/bin/env python3
import os
import re
for (dirpath, dirnames, filenames) in os.walk("."):
for fn in filenames:
if not fn.endswith(".c") and not fn.endswith(".h"):
continue
text = open(dirpath+"/"+fn,"rt").read()
text = text.replace("RtlSetLastWin32Error","SetLastError")
text = text.replace("RtlGetLastWin32Error","GetLastError")
if "SetLastError" not in text:
continue
varname = None
for line in text.split("\n"):
if "GetLastError" in line:
if m := re.search(r"([A-Za-z0-9_]+) *= *GetLastError", line):
prevline = line
varname = m[1]
if line == "}":
varname = None
if varname is not None and "SetLastError" in line:
if m := re.search(r"SetLastError\( *([A-Za-z0-9_]+) *\)", line):
if m[1] == varname:
print(dirpath+"/"+fn, prevline, line)
```
The script also flags https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/mpr/wnet.c#L2811, which is half set and half restore; I chose to left it unchanged.
Idea from https://gitlab.winehq.org/wine/wine/-/merge_requests/5020/diffs#6c845445f68…
--
v3: win32u: Use RtlRestoreLastWin32Error instead of RtlSetLastWin32Error if appropriate
everywhere: Change SetLastError to RestoreLastError if appropriate
https://gitlab.winehq.org/wine/wine/-/merge_requests/5035