Overwriting ctx->hWnd with the current focus window breaks the
relationship between the HIMC handle and its associated window.
This direct assignment does not update the corresponding state
in the wine server, leading to inconsistencies between client and
server.
Signed-off-by: chenzhengyong <chenzhengyong(a)uniontech.com>
--
v7: imm32: Do not overwrite input context window with GetFocus() in ime_ui_update_window.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9097
Starting with macOS 10.15, `mmap()` for a file with `PROT_EXEC` fails with `EPERM`. But for some reason, doing separate `mmap()` and then `mprotect()` calls works.
This fixes `NtUserRegisterClassExWOW: Failed to get shared session object for window class` errors seen when running a 32-bit EXE lacking the NX compat bit. The shared memory object being used for window classes was being mapped executable, this was failing because of the above, and then `map_file_into_view()` was falling back to `pread()` which doesn't make sense for a shared memory region. (It seems like a bug to use `pread()` in this scenario rather than return an error, although I'm not sure how that could be detected).
I don't love the preprocessor black-magic to replace every mmap() call, but it avoids having to modify any other functions. If we want to avoid that, `map_pe_header()` and `map_file_into_view()` are the `mmap()` calls that I know need to be changed.
CrossOver has used an almost-identical hack for years.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9126
This should be the case but some 32bit driver implementations are bogus
when more than 4G of memory is available.
Should fix a test that fails consistently now that we have a vulkan driver on Gitlab CI.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9129