intel-virtual-output: Always requery modes after OutputNotify
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Feb 2014 15:13:42 +0000 (15:13 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Feb 2014 15:13:42 +0000 (15:13 +0000)
References: https://bugs.freedesktop.org/show_bug.cgi?id=74800
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tools/virtual.c

index c6b7896..5952186 100644 (file)
@@ -454,7 +454,7 @@ static int clone_update_modes__randr(struct clone *clone)
        assert(clone->dst.rr_output);
        assert(clone->dst.display->rr_event);
 
-       from_res = XRRGetScreenResources(clone->dst.dpy, clone->dst.window);
+       from_res = _XRRGetScreenResourcesCurrent(clone->dst.dpy, clone->dst.window);
        if (from_res == NULL)
                goto err;
 
@@ -462,11 +462,10 @@ static int clone_update_modes__randr(struct clone *clone)
        if (from_info == NULL)
                goto err;
 
-       DBG(("%s(%s-%s): timestamp %ld (last %ld)\n", __func__,
+       DBG(("%s(%s-%s <- %s-%s): timestamp %ld (last %ld)\n", __func__,
             DisplayString(clone->src.dpy), clone->src.name,
-           from_info->timestamp, clone->timestamp));
-       if (from_info->timestamp == clone->timestamp)
-               goto err;
+            DisplayString(clone->dst.dpy), clone->dst.name,
+            from_info->timestamp, clone->timestamp));
 
        to_res = _XRRGetScreenResourcesCurrent(clone->src.dpy, clone->src.window);
        if (to_res == NULL)