Reset errno in X11 monitor enumeration
XOpenDisplay may succeed but set errno,
reset at the end of the function.
@@ -390,7 +390,6 @@ static int x11_shadow_pointer_position_update(x11ShadowSubsystem* subsystem)
templateMsg.xPos = subsystem->pointerX;
templateMsg.yPos = subsystem->pointerY;
templateMsg.Free = x11_shadow_message_free;
-
server = subsystem->server;
ArrayList_Lock(server->clients);
@@ -1176,6 +1175,7 @@ UINT32 x11_shadow_enum_monitors(MONITOR_DEF* monitors, UINT32 maxMonitors)
monitor->flags = 1;
}
+ errno = 0;
return numMonitors;
}
