--
v2: mfplay/tests: Add MF_SD_LANGUAGE and MF_SD_STREAM_NAME value tests.
winegstreamer: Extract stream name from QT demuxer private data.
winegstreamer: Query stream tags and set MF_SD_LANGUAGE attribute.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1542
Fixes an out of bounds access in `show_popup`.
```c
if (menu->FocusedItem != NO_SELECTED_ITEM)
{
menu->items[menu->FocusedItem].fState &= ~(MF_HILITE|MF_MOUSESELECT); // <- can crash here
menu->FocusedItem = NO_SELECTED_ITEM;
}
```
Menu resets focused item on show, not on close.
If items were later deleted, next time user opens the menu, menu can crash on out of bounds access and won't show up again, as menu thinks it's still on screen.
In other words:
- open split button dropdown
- click on any item
- clear dropdown items
- open dropdown again
Menu borked and won't open again.
Source for the testing app for reproduction.
[test.c](/uploads/2f703f63891b33e1a0eb0fcd27c912b7/test.c)
I guess, the alternative is to reset focused item when menu is closed, but not sure where's the best place to do that, haven't dug deep enough.
--
v3: win32u: Update focused item when inserting a menu item
win32u: Reset focused item if it was removed when removing a menu item
https://gitlab.winehq.org/wine/wine/-/merge_requests/1554
I recently noticed problems with building with clang in msvc mode when using my distro clang. It seems specific to its configuration, I think that it doesn't affect default clang.
One problem is that --rtlib=libgcc is specified in /etc/clang, which causes clang to produce:
```
clang-15: error: unsupported runtime library 'libgcc' for platform 'MSVC'
```
I think it's a clang bug here:
https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/…
It should probably check for -nodefaultlibs in addition to -nostdlib. It's easy to handle on Wine side by using -nostdlib.
The other problem is that clang for some reason doesn't define `_MSV_VER` by default. I found that it's defined only if I pass `-fuse-ld=lld` to the command line. That's weird because it shouldn't affect compilation step, it should matter only for linking and that's when we pass it. I didn't track it down in clang code itself, but if we can't depend on clang providing it by default, we need to make sure to pass `-fms-compatibility-version` ourselves. The exact version doesn't really matter, we mostly need to make sure that it's defined at all so that our #ifdefs work correctly.
--
v2: configure: Use -fuse-ld=lld also for compilation targets.
winegcc: Use -nostdlib instead of -nostartfiles on Clang MSVC targets.
configure: Use -nostdlib instead of -nostartfiles in WINE_TRY_PE_CFLAGS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1549