Zhiyi Zhang : winecfg: Set buddy window for the size up-down control only once.
Alexandre Julliard
julliard at winehq.org
Tue Jun 22 16:17:06 CDT 2021
Module: wine
Branch: master
Commit: bf6ed90cd6fd769534e8d7c2f1880f8db01b418b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bf6ed90cd6fd769534e8d7c2f1880f8db01b418b
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Tue Jun 22 16:18:05 2021 +0800
winecfg: Set buddy window for the size up-down control only once.
Fix the size up-down control becoming smaller every time the apply button is pressed in the Desktop
Integration tab.
UDM_SETBUDDY always shrinks the buddy window for a up-down control according to tests. And a
PSN_SETACTIVE notification is sent every time the apply button is pressed, thus init_dialog() gets
called again and sends an extra UDM_SETBUDDY message.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/winecfg/theme.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c
index b38b2ff26d6..687ea571311 100644
--- a/programs/winecfg/theme.c
+++ b/programs/winecfg/theme.c
@@ -434,6 +434,12 @@ static void enable_size_and_color_controls (HWND dialog, BOOL enable)
}
static void init_dialog (HWND dialog)
+{
+ SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETBUDDY,
+ (WPARAM)GetDlgItem(dialog, IDC_SYSPARAM_SIZE), 0);
+}
+
+static void update_dialog (HWND dialog)
{
updating_ui = TRUE;
@@ -452,7 +458,6 @@ static void init_dialog (HWND dialog)
}
theme_dirty = FALSE;
- SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETBUDDY, (WPARAM)GetDlgItem(dialog, IDC_SYSPARAM_SIZE), 0);
SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETRANGE, 0, MAKELONG(100, 8));
updating_ui = FALSE;
@@ -1197,6 +1202,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
update_shell_folder_listview(hDlg);
read_sysparams(hDlg);
init_mime_types(hDlg);
+ init_dialog(hDlg);
break;
case WM_DESTROY:
@@ -1349,7 +1355,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
case PSN_SETACTIVE: {
- init_dialog (hDlg);
+ update_dialog(hDlg);
break;
}
}
More information about the wine-cvs
mailing list