Mercurial > dwindows
changeset 1986:218fce0e3b06
Mac: dw_percent_set_pos() does not update the position when not called from
the main thread on Mojave. After implementing this change it occurs to me
that functions that return nothing, can probably avoid blocking while waiting
for the main thread. Consider this for future macro changes.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 07 Sep 2019 16:47:45 +0000 |
parents | 8d130e45430d |
children | 21811c9e2eaf |
files | mac/dw.m |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Tue Sep 03 16:58:09 2019 +0000 +++ b/mac/dw.m Sat Sep 07 16:47:45 2019 +0000 @@ -5277,8 +5277,12 @@ * handle: Handle to the percent bar to be set. * position: Position of the percent bar withing the range. */ -void API dw_percent_set_pos(HWND handle, unsigned int position) -{ +DW_FUNCTION_DEFINITION(dw_percent_set_pos, void, HWND handle, unsigned int position) +DW_FUNCTION_ADD_PARAM2(handle, position) +DW_FUNCTION_NO_RETURN(dw_percent_set_pos) +DW_FUNCTION_RESTORE_PARAM2(handle, HWND, position, unsigned int) +{ + DW_FUNCTION_INIT; DWPercent *percent = handle; /* Handle indeterminate */ @@ -5297,6 +5301,7 @@ } [percent setDoubleValue:(double)position]; } + DW_FUNCTION_RETURN_NOTHING; } /*