[PATCH] Fix present_notify to return right away when querying current or past msc.

Axel Davy axel.davy at ens.fr
Wed Oct 29 05:31:42 PDT 2014


When the target msc is past or is the current one, we want to get immediate
feedback. This patch fixes this behaviour.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 present/present.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/present/present.c b/present/present.c
index 47566c7..a9f2214 100644
--- a/present/present.c
+++ b/present/present.c
@@ -866,7 +866,7 @@ present_pixmap(WindowPtr window,
 
     xorg_list_add(&vblank->event_queue, &present_exec_queue);
     vblank->queued = TRUE;
-    if (target_msc >= crtc_msc) {
+    if ((pixmap && target_msc >= crtc_msc) || (!pixmap && target_msc > crtc_msc)) {
         ret = present_queue_vblank(screen, target_crtc, vblank->event_id, target_msc);
         if (ret != Success) {
             xorg_list_del(&vblank->event_queue);
@@ -929,7 +929,7 @@ present_notify_msc(WindowPtr window,
                           0, 0,
                           NULL,
                           NULL, NULL,
-                          0,
+                          PresentOptionAsync,
                           target_msc, divisor, remainder, NULL, 0);
 }
 
-- 
1.9.1



More information about the xorg-devel mailing list