Module: wine
Branch: oldstable
Commit: 71dc3ca16ecf778b0b38a801c8a967ce491b70f5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=71dc3ca16ecf778b0b38a801…
Author: Gerald Pfeifer <gerald(a)pfeifer.com>
Date: Tue Nov 23 21:07:18 2021 +0100
configure: Diagnose if NetAPI is not present.
For most other configure options we are warning when some dependency
is not present, in particular when it's been explicitly requested.
Also do this for Samba NetAPI now.
Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
(cherry picked from commit 07c9dd9bdf560f86598aa496a0ffaec6bb8479fa)
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
configure | 11 +++++++++++
configure.ac | 4 ++++
2 files changed, 15 insertions(+)
diff --git a/configure b/configure
index 9931d53d463..ef010a831af 100755
--- a/configure
+++ b/configure
@@ -16460,6 +16460,17 @@ fi
CPPFLAGS=$ac_save_CPPFLAGS
fi
+if test "x$ac_cv_lib_soname_netapi" != xyes
+then :
+ case "x$with_netapi" in
+ x) as_fn_append wine_notices "|libnetapi not found, Samba NetAPI won't be supported." ;;
+ xno) ;;
+ *) as_fn_error $? "libnetapi not found, Samba NetAPI won't be supported.
+This is an error since --with-netapi was requested." "$LINENO" 5 ;;
+esac
+enable_netapi=${enable_netapi:-no}
+fi
+
if test "x$enable_winealsa_drv$enable_winecoreaudio_drv$enable_winepulse_drv$enable_wineoss_drv$enable_wineandroid_drv" = xnonononono -a \
"x$with_alsa$with_coreaudio$with_oss$with_pulse" != xnononono
diff --git a/configure.ac b/configure.ac
index 9cf059e1edc..e4c9c7edfef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1930,6 +1930,10 @@ then
WINE_PACKAGE_FLAGS(NETAPI,[netapi],,,,
[WINE_CHECK_SONAME(netapi,libnetapi_init,,[AC_DEFINE_UNQUOTED(SONAME_LIBNETAPI,["libnetapi.$LIBEXT"])],[$NETAPI_LIBS])])
fi
+WINE_NOTICE_WITH(netapi,[test "x$ac_cv_lib_soname_netapi" != xyes],
+ [libnetapi not found, Samba NetAPI won't be supported.],
+ [enable_netapi])
+
dnl **** Check for any sound system ****
if test "x$enable_winealsa_drv$enable_winecoreaudio_drv$enable_winepulse_drv$enable_wineoss_drv$enable_wineandroid_drv" = xnonononono -a \
Module: wine
Branch: oldstable
Commit: d0b9ab2b91bc202df03691efa479fd8100b18914
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d0b9ab2b91bc202df03691ef…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com>
Date: Thu Dec 9 16:13:13 2021 +0800
comctl32/button: Support image list margin for buttons with BS_CENTER or BS_VCENTER.
WinSCP uses image list margin to adjust image position on a button when theming is on.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52076
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
(cherry picked from commit feb0b73a3c7281dee923cdcfb5ebf4ae954cdc7b)
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/comctl32/button.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 67bf5ceae48..5e16fdb0e08 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -1125,7 +1125,10 @@ static void BUTTON_PositionRect(LONG style, const RECT *outerRect, RECT *innerRe
switch (style & BS_CENTER)
{
case BS_CENTER:
- innerRect->left = outerRect->left + (outerRect->right - outerRect->left - width) / 2;
+ /* The left and right margins are added to the inner rectangle to get a new rectangle. Then
+ * the new rectangle is adjusted to be in the horizontal center */
+ innerRect->left = outerRect->left + (outerRect->right - outerRect->left - width
+ + margin->left - margin->right) / 2;
innerRect->right = innerRect->left + width;
break;
case BS_RIGHT:
@@ -1151,7 +1154,10 @@ static void BUTTON_PositionRect(LONG style, const RECT *outerRect, RECT *innerRe
break;
case BS_VCENTER:
default:
- innerRect->top = outerRect->top + (outerRect->bottom - outerRect->top - height) / 2;
+ /* The top and bottom margins are added to the inner rectangle to get a new rectangle. Then
+ * the new rectangle is adjusted to be in the vertical center */
+ innerRect->top = outerRect->top + (outerRect->bottom - outerRect->top - height
+ + margin->top - margin->bottom) / 2;
innerRect->bottom = innerRect->top + height;
break;
}