aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 1120c330e8b..265eb6c65ac 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4295,8 +4295,8 @@ x_get_monitor_attributes_xrandr (struct x_display_info *dpyinfo)
4295 { 4295 {
4296 XRROutputInfo *info = XRRGetOutputInfo (dpy, resources, 4296 XRROutputInfo *info = XRRGetOutputInfo (dpy, resources,
4297 resources->outputs[i]); 4297 resources->outputs[i]);
4298 Connection conn = info ? info->connection : RR_Disconnected; 4298 if (!info)
4299 RRCrtc id = info ? info->crtc : None; 4299 continue;
4300 4300
4301 if (strcmp (info->name, "default") == 0) 4301 if (strcmp (info->name, "default") == 0)
4302 { 4302 {
@@ -4307,9 +4307,9 @@ x_get_monitor_attributes_xrandr (struct x_display_info *dpyinfo)
4307 return Qnil; 4307 return Qnil;
4308 } 4308 }
4309 4309
4310 if (conn != RR_Disconnected && id != None) 4310 if (info->connection != RR_Disconnected && info->crtc != None)
4311 { 4311 {
4312 XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, id); 4312 XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, info->crtc);
4313 struct MonitorInfo *mi = &monitors[i]; 4313 struct MonitorInfo *mi = &monitors[i];
4314 XRectangle workarea_r; 4314 XRectangle workarea_r;
4315 4315