ERR_FAIL_V_MSG(Ref<Image>(),vformat("XImage with RGB mask %x %x %x and depth %d is not supported.",(uint64_t)image->red_mask,(uint64_t)image->green_mask,(uint64_t)image->blue_mask,(int64_t)image->bits_per_pixel));
if(monitor_info->x!=monitors[p_screen].x||monitor_info->y!=monitors[p_screen].y){// If X and Y aren't the same as the monitor we're looking for, this isn't the right monitor. Continue.
ERR_PRINT("An error occurred while trying to get the screen refresh rate.");// We should have returned the refresh rate by now. An error must have occurred.
//X11 can go between windows and have no focus for a while, when creating them or something else. Use this as safety to avoid unnecessary focus in/outs.