helloSystem / Menu

Global menu bar written in Qt
43 stars 14 forks source link

Show menus of Windows applications using WINE #147

Open probonopd opened 1 year ago

probonopd commented 1 year ago

It would be neat if we could get Menu to render the menus of Windows applications using WINE.

This woud make Windows applications work much more like native applications.

It seems that Windows applications like REAPER are using the SetMenuItemInfoA Windows API function in the winuser.h header to modify the properties of a menu item in a menu, such as its text, state, etc. This can be seen by running a Windows application in WINE like this: WINEDEBUG=+relay,+snoop wine64 ~/.wine/drive_c/Program\ Files/REAPER\ \(x64\)/reaper.exe 2>&1 | grep user32 | grep -i Menu.

According to https://github.com/wine-mirror/wine/blob/master/dlls/user32/user32.spec, there are

So the question is, could we intercept these calls in WINE, and export them via D-Bus instead of having them rendered by WINE?

probonopd commented 1 year ago

Ableton Live Lite, which is written in Qt, appears to be using the same calls. Great!

probonopd commented 1 year ago

Maybe @Gcenx knows whether this has been attempted or done before: To display Windows application menus in the Mac global menu bar (or in this case, helloSystem's).