From e882fd1f1349d6f2b667d13a092db091061da1af Mon Sep 17 00:00:00 2001 From: Stu Black Date: Wed, 7 Jan 2026 16:13:55 -0500 Subject: [PATCH] Make WMCreateCommandButton into a proper function instead of a macro. --- WINGs/WINGs/WINGs.h | 6 +----- WINGs/wbutton.c | 8 ++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/WINGs/WINGs/WINGs.h b/WINGs/WINGs/WINGs.h index c6f638ff..b1ecad12 100644 --- a/WINGs/WINGs/WINGs.h +++ b/WINGs/WINGs/WINGs.h @@ -1039,11 +1039,7 @@ void WMCloseWindow(WMWindow *win); void WMSetButtonAction(WMButton *bPtr, WMAction *action, void *clientData); -#define WMCreateCommandButton(parent) \ - WMCreateCustomButton((parent), WBBSpringLoadedMask\ - |WBBPushInMask\ - |WBBPushLightMask\ - |WBBPushChangeMask) +WMButton* WMCreateCommandButton(WMWidget *parent); #define WMCreateRadioButton(parent) \ WMCreateButton((parent), WBTRadio) diff --git a/WINGs/wbutton.c b/WINGs/wbutton.c index c8d78d97..f8c23cd3 100644 --- a/WINGs/wbutton.c +++ b/WINGs/wbutton.c @@ -216,6 +216,14 @@ WMButton *WMCreateButton(WMWidget * parent, WMButtonType type) return bPtr; } +WMButton *WMCreateCommandButton(WMWidget *parent) +{ + return WMCreateCustomButton( + parent, + WBBSpringLoadedMask|WBBPushInMask|WBBPushLightMask|WBBPushChangeMask + ); +} + static void updateDisabledMask(WMButton * bPtr) { WMScreen *scr = WMWidgetScreen(bPtr); -- 2.39.5