summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-02-17 13:45:32 -0500
committerAdam Jackson <ajax@redhat.com>2009-04-01 11:01:55 -0400
commitbeb228842c77fab4a446e028dd501a01f0fb3fd3 (patch)
tree94d69e95fd76ca968e03d029574a4b484b119700
parent9418f5523bd923b122f6e67c33c40e0e9c29ab50 (diff)
Allow zero replies from GetPanning to mean panning is unavailable.
-rw-r--r--xrandr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xrandr.c b/xrandr.c
index d08a661..0f5ab94 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -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);