I think it would be very nice to have something like that to reduce the burden of implementing COM interfaces. This shows for instance on the windows.gaming.input module a 30% LoC reduction (from ~6800 to ~4700), even though the module already had a boilerplate helper macros already.
The MR introduces macros to automatically implement each IUnknown method, as well as all of them at once. It also includes a helper to implement IInspectable methods at once, as well as macros to forward both interface methods to a base interface or an outer object. Last, it provides higher-level macros to implement a main interface and any number of sub interfaces and generate IUnknown, forwarding and vtables for all of them at once.
It uses widl to generate additional per-interface macros, for things like inheritance and vtable generation. The rest of the macros are otherwise shared in a Wine-specific header.
The implementation is split to show individual macro being used, although they are later replaced by higher-level macros. The individual helpers are still useful in some corner cases where specific behavior needs to be implemented, or for aggregating classes.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6207
Fix the wayland side of https://bugs.winehq.org/show_bug.cgi?id=55336
### Exit menu key by default:
That's the actual behavior, any non-special key will exit the menu key, and be sent to the client.
I was also wondering if we should add `menu_sys_key = f10_key = 0;` when receiving a `WM_ACTIVATE` in `win32u/defwnd.c`'s `default_window_proc` but I guess not ?
### Fix repeated key for no reason:
For some reason when ALT is pressed, it is spammed and thus spams SYS_COMMAND. This fix that, but I don't know what I am doing here. I don't see any repeating key spamming with winex11 but I could be wrong. However alt/SYS_COMMAND should not be repeated.
That wasn't happening with winex11.drv.
### Fix release_all_keys modifier filtering:
That was the main reason why alt-tab leads to the menu key, NtUserGetAsyncKeyboardState also uses left and right system keys.
### Fix release_all_keys scan value:
This one is incomplete, the scan code or something else is broken, at least with the down arrow on a french azerty keyboard. Even though release_all_keys sends the input for the down arrow, it is not transmitted to NtUserTranslateMessage.
keyboard_handle_key send a key=28 and scan=0x150, but release_all_keys sends key=28 and scan=0x50. Winex11 sends 0x50, but internally NtUserTranslateMessage receives 0x150.
This results in the down arrow kept being repeated while being focused out, and after focusing in, pressing again the arrow is needed.
I tried changing things but ultimately it doesn't change anything.
Maybe NtUserMapVirtualKeyEx is broken or is it the handling of the keyboard layout ? Or is it actually keyboard_handle_key ?
Winex11 and winemac uses `if !(NtUserGetAsyncKeyboardState(state)) return;` but I guess here we don't need to as we want to release all keys even if it fails ?
--
v2: winewayland.drv: Fix release_all_keys scan value
winewayland.drv: Fix release_all_keys modifier filtering
server: Fix repeated key for no reason
https://gitlab.winehq.org/wine/wine/-/merge_requests/6199
Currently shell32 only transfers the plain icon for `Shell_NotifyIcon` calls, ignoring balloon icons. This patch allows transferring both images to explorer.exe tray.
--
v7: shell32: add support for balloon icon copying
https://gitlab.winehq.org/wine/wine/-/merge_requests/2875
> virtual monitor is different than physical monitor,it has no builtin resolution. it is a window on host. for example, wine explorer.exe /desktop=123x456 can also show. so it has no need for apply builtin mode.
Of course, the virtual monitor window doesn't have any real resolution. However, it's a virtual monitor, its purpose is to simulate a physical monitor. That's why we added a bunch of fake resolutions so that functions like ChangeDisplaySettings() can succeed. The initial resolution/size of the virtual monitor should be the one specified by the user, either via the registry or command line.
> we can chat by weixin, my weixinhao fan-wenjie
You can use #winehackers at libera IRC. So that others can see and maybe join the conversation.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6150#note_77734