comparison mac/dw.m @ 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 e643d280edae
comparison
equal deleted inserted replaced
1985:8d130e45430d 1986:218fce0e3b06
5275 * Sets the percent bar position. 5275 * Sets the percent bar position.
5276 * Parameters: 5276 * Parameters:
5277 * handle: Handle to the percent bar to be set. 5277 * handle: Handle to the percent bar to be set.
5278 * position: Position of the percent bar withing the range. 5278 * position: Position of the percent bar withing the range.
5279 */ 5279 */
5280 void API dw_percent_set_pos(HWND handle, unsigned int position) 5280 DW_FUNCTION_DEFINITION(dw_percent_set_pos, void, HWND handle, unsigned int position)
5281 { 5281 DW_FUNCTION_ADD_PARAM2(handle, position)
5282 DW_FUNCTION_NO_RETURN(dw_percent_set_pos)
5283 DW_FUNCTION_RESTORE_PARAM2(handle, HWND, position, unsigned int)
5284 {
5285 DW_FUNCTION_INIT;
5282 DWPercent *percent = handle; 5286 DWPercent *percent = handle;
5283 5287
5284 /* Handle indeterminate */ 5288 /* Handle indeterminate */
5285 if(position == DW_PERCENT_INDETERMINATE) 5289 if(position == DW_PERCENT_INDETERMINATE)
5286 { 5290 {
5295 [percent stopAnimation:percent]; 5299 [percent stopAnimation:percent];
5296 [percent setIndeterminate:NO]; 5300 [percent setIndeterminate:NO];
5297 } 5301 }
5298 [percent setDoubleValue:(double)position]; 5302 [percent setDoubleValue:(double)position];
5299 } 5303 }
5304 DW_FUNCTION_RETURN_NOTHING;
5300 } 5305 }
5301 5306
5302 /* 5307 /*
5303 * Create a new checkbox window (widget) to be packed. 5308 * Create a new checkbox window (widget) to be packed.
5304 * Parameters: 5309 * Parameters: