More fixes for menus and combo boxes.

This commit is contained in:
ak47 committed 2026-10-11 00:10:21 -04:00
1 parent 67ebc28d15
commit 872388a59b
11 files changed
+392 -35

No files matched your search

+20 -8
View File
@@ -25,11 +25,12 @@ Building requires an x86_64 Linux host with:
- Make and native GCC/G++ (the script uses CMake's default Makefile generator);
- `pkg-config` and the GLib/GIO development files;
- Wine development tools: `winegcc`, `wineg++`, and `widl`;
- `x86_64-w64-mingw32-gcc` to build the native menu hook DLL
- `x86_64-w64-mingw32-gcc` and `i686-w64-mingw32-gcc` to build native menu hooks
(`mingw-w64-gcc` on Arch Linux).
The target is a Winelib executable. A 32-bit build is not provided by this
project yet; it needs a 32-bit Winegcc and 32-bit GLib/GIO development setup.
The D-Bus helper is a 64-bit Winelib executable. A small 32-bit Windows
companion supplies menu hooks for 32-bit applications, without requiring
32-bit Linux GLib/GIO development files.
## Build
@@ -54,7 +55,7 @@ development packages. Removal does not require these dependencies.
Use `./build.sh -r` to remove the local installation, or
`sudo ./build.sh -r` to remove the system installation. If a user has no local
installation but a system installation exists, the script requests the latter
command without running sudo itself. Removal deletes only the three helper
command without running sudo itself. Removal deletes only the five helper
files and leaves other directory contents untouched.
Alternative build and install locations may be supplied as positional
@@ -72,6 +73,8 @@ That installs the helper and its Winelib sidecar as:
$prefix/libexec/cthulhu/wine/cthulhu-wine-access.exe
$prefix/libexec/cthulhu/wine/cthulhu-wine-access.exe.so
$prefix/libexec/cthulhu/wine/wine-access-menu.dll
$prefix/libexec/cthulhu/wine/wine-access-menu32.dll
$prefix/libexec/cthulhu/wine/wine-access-menu-host32.exe
```
For Cthulhu-Go, either set `CTHULHU_WINE_ACCESS_HELPER` to the installed
@@ -98,15 +101,24 @@ The standard-control reader is deliberately limited to native Wine controls.
Custom-drawn, DirectX, and game-specific accessibility APIs remain the
responsibility of the application or its accessibility middleware.
Native menu reading uses an accompanying 64-bit Windows hook DLL. It observes
Native menu reading uses accompanying 64-bit and 32-bit Windows hook DLLs. They
observe
`WM_MENUSELECT` inside Wine applications and sends menu labels, displayed
shortcuts, submenu roles, and checked/unavailable states to the helper. The
helper queues these messages before forwarding them over D-Bus, suppresses
repeated selections, and restores standard-control focus reporting when menus
close. The hook applies to the helper's Wine desktop and prefix and is removed
on normal shutdown. It is disabled by `--no-dialog-reader`.
close. The hooks apply to the helper's Wine desktop and prefix and are removed
on normal shutdown. The 32-bit host attaches to the foreground 32-bit UI thread
so Wine's global hook chain cannot interfere with 64-bit menus. It exits when the helper dies or its bridge
window closes. Menu hooks are disabled by `--no-dialog-reader`. The 32-bit
companion handles menus; the editor subclass described below remains 64-bit.
The same DLL subclasses standard `Edit` controls, including Wine Notepad's
Focused combo boxes are checked every 100 ms to recover value changes that
Wine does not report through WinEvents. The combo's internal list events use
the same source identity as the focused combo, so the reader can accept the
new value without a Tab/Shift+Tab round trip.
The 64-bit DLL subclasses standard `Edit` controls, including Wine Notepad's
document area and `WindowsForms10.EDIT.app.*` controls. Windows Forms fields
use visible sibling labels immediately to their left, even when the labels
were created after the fields. Protected fields report their label and