Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55847
-- v2: user32: Add stub for GetWindowDpiHostingBehavior user32: Add stub for SetThreadDpiHostingBehavior
From: Fabian Maurer dark.shadow4@web.de
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55847 --- dlls/user32/sysparams.c | 9 +++++++++ dlls/user32/user32.spec | 1 + include/windef.h | 6 ++++++ 3 files changed, 16 insertions(+)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 5ededfee62a..58a6b8b8293 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -746,6 +746,15 @@ DPI_AWARENESS_CONTEXT WINAPI SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT return ULongToHandle( prev ); }
+/********************************************************************** + * SetThreadDpiHostingBehavior (USER32.@) + */ +DPI_HOSTING_BEHAVIOR WINAPI SetThreadDpiHostingBehavior(DPI_HOSTING_BEHAVIOR value) +{ + FIXME("(%ul): stub\n", value); + return DPI_HOSTING_BEHAVIOR_DEFAULT; +} + /*********************************************************************** * MonitorFromRect (USER32.@) */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 96e6e1a7d6b..fc4441bdec8 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -719,6 +719,7 @@ @ stdcall SetTaskmanWindow (long) @ stdcall SetThreadDesktop(long) NtUserSetThreadDesktop @ stdcall SetThreadDpiAwarenessContext(ptr) +@ stdcall SetThreadDpiHostingBehavior(long) @ stdcall SetTimer(long long long ptr) @ stdcall SetUserObjectInformationA(long long ptr long) @ stdcall SetUserObjectInformationW(long long ptr long) NtUserSetObjectInformation diff --git a/include/windef.h b/include/windef.h index b22e15c4dbf..13f3b08a95f 100644 --- a/include/windef.h +++ b/include/windef.h @@ -429,6 +429,12 @@ typedef enum DPI_AWARENESS DPI_AWARENESS_PER_MONITOR_AWARE } DPI_AWARENESS;
+typedef enum DPI_HOSTING_BEHAVIOR { + DPI_HOSTING_BEHAVIOR_INVALID = -1, + DPI_HOSTING_BEHAVIOR_DEFAULT = 0, + DPI_HOSTING_BEHAVIOR_MIXED = 1 +} DPI_HOSTING_BEHAVIOR; + #define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1) #define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2) #define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3)
From: Fabian Maurer dark.shadow4@web.de
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55847 --- dlls/user32/sysparams.c | 9 +++++++++ dlls/user32/user32.spec | 1 + 2 files changed, 10 insertions(+)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 58a6b8b8293..c3910b7e3dd 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -755,6 +755,15 @@ DPI_HOSTING_BEHAVIOR WINAPI SetThreadDpiHostingBehavior(DPI_HOSTING_BEHAVIOR val return DPI_HOSTING_BEHAVIOR_DEFAULT; }
+/********************************************************************** + * GetWindowDpiHostingBehavior (USER32.@) + */ +DPI_HOSTING_BEHAVIOR WINAPI GetWindowDpiHostingBehavior(HWND hwnd) +{ + FIXME("(%p): stub\n", hwnd); + return DPI_HOSTING_BEHAVIOR_DEFAULT; +} + /*********************************************************************** * MonitorFromRect (USER32.@) */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index fc4441bdec8..c8d11e1c442 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -410,6 +410,7 @@ @ stdcall GetWindowDC(long) NtUserGetWindowDC @ stdcall GetWindowDisplayAffinity(long ptr) @ stdcall GetWindowDpiAwarenessContext(long) +@ stdcall GetWindowDpiHostingBehavior(long) @ stdcall GetWindowInfo(long ptr) @ stdcall GetWindowLongA(long long) @ stdcall -arch=win64 GetWindowLongPtrA(long long)
On Sat Nov 4 15:07:58 2023 +0000, Nikolay Sivov wrote:
This should return the old value.
Sure, updated.
Turns out this is used by WinForms from .NET 8, so it would be nice to have for wine 9.
This merge request was approved by Etaash Mathamsetty.