This is a heavily simplified version of Michael Müller's staging patch (the staging version got broken by the PE/Unix split)
I rebased that staging patch but I thought it was too big for what it does (so I did this instead)
As for automatically changing the status, SM_MEDIACENTER would require Windows version checks (which are never used in Wine) and SM_TABLETPC would likely require touchscreen/tablet detection (rbernon is working on some touch stuff so that could be useful)
-- v3: win32u: Enable the media center metric by default. win32u: Add registry key for changing tablet status.
From: Aida Jonikienė aidas957@gmail.com
Some applications expect the tablet PC metric to return a positive value (so add an option to set that).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18732 --- dlls/win32u/sysparams.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index cc27f3dc7f2..9947307f03f 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -160,6 +160,7 @@ static pthread_mutex_t display_lock = PTHREAD_MUTEX_INITIALIZER;
static BOOL emulate_modeset; BOOL decorated_mode = TRUE; +BOOL tabletpc_mode = FALSE; UINT64 thunk_lock_callback = 0;
#define VIRTUAL_HMONITOR ((HMONITOR)(UINT_PTR)(0x10000 + 1)) @@ -5432,6 +5433,8 @@ void sysparams_init(void) decorated_mode = IS_OPTION_TRUE( buffer[0] ); if (!get_config_key( hkey, appkey, "EmulateModeset", buffer, sizeof(buffer) )) emulate_modeset = IS_OPTION_TRUE( buffer[0] ); + if (!get_config_key( hkey, appkey, "TabletPC", buffer, sizeof(buffer) )) + tabletpc_mode = IS_OPTION_TRUE( buffer[0] );
#undef IS_OPTION_TRUE
@@ -6608,6 +6611,7 @@ int get_system_metrics( int index ) case SM_CYFOCUSBORDER: return 1; case SM_TABLETPC: + return tabletpc_mode; case SM_MEDIACENTER: return 0; case SM_CMETRICS:
From: Aida Jonikienė aidas957@gmail.com
Very few applications likely check for this status metric (so it should be safe to enable it by default). --- dlls/win32u/sysparams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 9947307f03f..7b66873404c 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -6613,7 +6613,7 @@ int get_system_metrics( int index ) case SM_TABLETPC: return tabletpc_mode; case SM_MEDIACENTER: - return 0; + return 1; case SM_CMETRICS: return SM_CMETRICS; default:
I don't see any evidence that this is fixing a real app. The mentioned installer doesn't work even with the patch.
On Mon Nov 18 21:13:53 2024 +0000, Alexandre Julliard wrote:
I don't see any evidence that this is fixing a real app. The mentioned installer doesn't work even with the patch.
I'll try the installer myself and see if I can get further in it (if the installer requires extra work then I'll try to submit it in MR form)
On Mon Nov 18 21:13:53 2024 +0000, Aida Jonikienė wrote:
I'll try the installer myself and see if I can get further in it (if the installer requires extra work then I'll try to submit it in MR form)
The installer does work with the `TabletPC` registry option set and the Windows version set to `XP 64` in `winecfg` (because the installer checks for `Service Pack 2` string with `GetVersionExW()`)
After the installer "completes", there's a mshtml dialog for actually installing the programs (which works okay with Wine Gecko) but most of the programs require .NET Framework to install (so make sure or .NET Framework or Wine Mono is installed first)
The mshtml installer does crash in `xul` during Snipping Tool installation (but the rest of the installers have no issues)
As for the working apps, Ink Art works fine (and it's the only app that works) while Ink Crossword requires the `Microsoft.Ink` library, Ink Desktop errors out on the `ShellDispatch_ToggleDesktop` stub, Media Transfer has some issues loading the `AxWindowsMediaPlayer` control (this is probably both a Wine Mono and Wine's `wmp` library issues) and Snipping Tool has a vague error message (but it didn't seem to install properly so that may be expected)