This restores the feature we had with the testbot running related on intermediate commits, though it only does it on Linux and it would be nice to have it on Windows too.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1240
This adds a new Input tab to winecfg, moving the mouse grab settings there. Then this makes winex11 keyboard layout detection configurable as well, allowing the user to override the keyboard layout detection if for some reason it was incorrect.
This isn't solving anything yet, but I then intend to make keyboard scancode detection configurable as well, and optional.
As I described in https://www.winehq.org/pipermail/wine-devel/2020-October/175641.html, I believe that X11 keyboard keycode to scancode mapping is most of the time a fixed mapping, except in some rare cases.
Trying to detect it from the keyboard layout will never work reliably, especially nowadays where keyboard layouts are completely made up from Linux IME (for instance a GNOME language settings with up to four keyboard layouts translates to a single Xkb mapping using groups for each layout). The X11 keycode are remapped only in some more rarely used implementations, such as XVNC and we should try to detect it only in such cases.
Many Windows applications are depending on accurate scancodes, and making the mapping detection optional (and disabled by default) will solve all the issues we have in the most common case (https://bugs.winehq.org/show_bug.cgi?id=30984, https://bugs.winehq.org/show_bug.cgi?id=45605).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2062
In the implementation of
[`evr_disconnect()`](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.2/dlls/evr/evr.c#L325-333),
it will try to clear types of mixer by pass null to
`IMFTransform_SetInputType()`:
```c
static void evr_disconnect(struct strmbase_renderer *iface)
{
struct evr *filter = impl_from_strmbase_renderer(iface);
if (filter->mixer)
IMFTransform_SetInputType(filter->mixer, 0, NULL, 0);
evr_set_input_type(filter, NULL);
evr_release_services(filter);
}
```
This null ptr (`media_type`) will be pass to
[`video_mixer_collect_output_types()`](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.2/dlls/evr/mixer.c#L869)
and cause a [crash](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.2/dlls/evr/mixer.c…:
```c
static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *media_type, DWORD flags)
{
...
if (!mixer->device_manager)
hr = MF_E_NOT_INITIALIZED;
else
{
if (SUCCEEDED(hr = video_mixer_get_processor_service(mixer, &service)))
{
if (SUCCEEDED(hr = video_mixer_init_dxva_videodesc(media_type, &video_desc)))
...
```
In this patch, `video_mixer_transform_SetInputType()` will only clear types when
got a NULL `media_type` and return `S_OK`.
--
v6: evr: Fix crash when clear input type for the mixer
https://gitlab.winehq.org/wine/wine/-/merge_requests/2263
When dmSize is zero or greter than size of input buffer, `IsValidDevmodeW()`
failed in Windows 10.
But current implementation in wine, it will return `true` because
there is no check to `dm.dmSize`.
--
v4: winspool: Check dmSize in IsValidDevmodeW
https://gitlab.winehq.org/wine/wine/-/merge_requests/2262
In the implementation of
[`evr_disconnect()`](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.2/dlls/evr/evr.c#L325-333),
it will try to clear types of mixer by pass null to
`IMFTransform_SetInputType()`:
```c
static void evr_disconnect(struct strmbase_renderer *iface)
{
struct evr *filter = impl_from_strmbase_renderer(iface);
if (filter->mixer)
IMFTransform_SetInputType(filter->mixer, 0, NULL, 0);
evr_set_input_type(filter, NULL);
evr_release_services(filter);
}
```
This null ptr (`media_type`) will be pass to
[`video_mixer_collect_output_types()`](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.2/dlls/evr/mixer.c#L869)
and cause a [crash](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.2/dlls/evr/mixer.c…:
```c
static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *media_type, DWORD flags)
{
...
if (!mixer->device_manager)
hr = MF_E_NOT_INITIALIZED;
else
{
if (SUCCEEDED(hr = video_mixer_get_processor_service(mixer, &service)))
{
if (SUCCEEDED(hr = video_mixer_init_dxva_videodesc(media_type, &video_desc)))
...
```
In this patch, `video_mixer_transform_SetInputType()` will only clear types when
got a NULL `media_type` and return `S_OK`.
--
v5: evr: Fix crash when clear input type for the mixer
https://gitlab.winehq.org/wine/wine/-/merge_requests/2263