diff options
author | Adam Jackson <ajax@redhat.com> | 2009-02-17 13:45:32 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-04-01 11:01:55 -0400 |
commit | beb228842c77fab4a446e028dd501a01f0fb3fd3 (patch) | |
tree | 94d69e95fd76ca968e03d029574a4b484b119700 | |
parent | 9418f5523bd923b122f6e67c33c40e0e9c29ab50 (diff) |
Allow zero replies from GetPanning to mean panning is unavailable.
-rw-r--r-- | xrandr.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1099,8 +1099,16 @@ get_crtcs (void) #endif XRRPanning *panning_info = NULL; - if (has_1_3) + if (has_1_3) { + XRRPanning zero; + memset(&zero, 0, sizeof(zero)); panning_info = XRRGetPanning (dpy, res, res->crtcs[c]); + zero.timestamp = panning_info->timestamp; + if (!memcmp(panning_info, &zero, sizeof(zero))) { + Xfree(panning_info); + panning_info = NULL; + } + } set_name_xid (&crtcs[c].crtc, res->crtcs[c]); set_name_index (&crtcs[c].crtc, c); |