Make WMCreateCommandButton into a proper function instead of a macro. #20

Merged
trurl merged 1 commits from trurl/wmaker:refactor/riir.command_button_fn into refactor/riir 2026-03-02 12:22:05 -05:00
2 changed files with 9 additions and 5 deletions

View File

@@ -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)

View File

@@ -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);