/*********************************************************************** * macdrv_get_desktop_rect * * Returns the rectangle encompassing all the screens. */ CGRect macdrv_get_desktop_rect(void) { CGRect ret; CGDirectDisplayID displayIDs[32]; uint32_t count, i; EnterCriticalSection(&device_data_section); if (!device_data_valid) { desktop_rect = CGRectNull; if (CGGetActiveDisplayList(sizeof(displayIDs)/sizeof(displayIDs[0]), displayIDs, &count) != kCGErrorSuccess || !count) { displayIDs[0] = CGMainDisplayID(); count = 1; } for (i = 0; i < count; i++) desktop_rect = CGRectUnion(desktop_rect, CGDisplayBounds(displayIDs[i])); } ret = desktop_rect; LeaveCriticalSection(&device_data_section); TRACE("%s\n", wine_dbgstr_cgrect(ret)); return ret; }
/*********************************************************************** * macdrv_get_desktop_rect * * Returns the rectangle encompassing all the screens. */ CGRect macdrv_get_desktop_rect(void) { CGRect ret; EnterCriticalSection(&device_data_section); if (!device_data_valid) { check_retina_status(); compute_desktop_rect(); } ret = desktop_rect; LeaveCriticalSection(&device_data_section); TRACE("%s\n", wine_dbgstr_cgrect(ret)); return ret; }