If on linux, in CIrrDeviceLinux.cpp:
- {l Code}: {l Select All Code}
RROutput primary_id = XRRGetOutputPrimary(display, DefaultRootWindow(display));
for (int i = 0; i < res->noutput; i++)
{
XRROutputInfo* output_tmp = XRRGetOutputInfo(display, res, res->outputs[i]);
if (!output_tmp || !output_tmp->crtc || output_tmp->connection == RR_Disconnected)
{
XRRFreeOutputInfo(output_tmp);
continue;
}
XRRCrtcInfo* crtc_tmp = XRRGetCrtcInfo(display, res, output_tmp->crtc);
if (!crtc_tmp)
{
XRRFreeOutputInfo(output_tmp);
continue;
}
if (res->outputs[i] == primary_id ||
output_id == BadRROutput || crtc_tmp->x < crtc->x ||
(crtc_tmp->x == crtc->x && crtc_tmp->y < crtc->y))
{
XRRFreeCrtcInfo(crtc);
XRRFreeOutputInfo(output);
output = output_tmp;
crtc = crtc_tmp;
output_id = res->outputs[i];
}
else
{
XRRFreeCrtcInfo(crtc_tmp);
XRRFreeOutputInfo(output_tmp);
}
if (res->outputs[i] == primary_id)
break;
}
It uses primary display if available. If not available, it uses the most top left display.
So probably
- {l Code}: {l Select All Code}
if (res->outputs[i] == primary_id)
should be changed to
- {l Code}: {l Select All Code}
if (res->outputs[i] != primary_id)
in both places, assuming that you have two monitors connected. I didn't test it though.