summaryrefslogtreecommitdiff
path: root/present
diff options
context:
space:
mode:
authorAxel Davy <axel.davy@ens.fr>2014-10-29 13:31:42 +0100
committerKeith Packard <keithp@keithp.com>2014-10-30 14:37:15 -0700
commit882f2d10d99a04a96afc0ce0c8937e16bec3afb5 (patch)
tree3795ba9065cd64d994de7bf9fc6a1c48a73a841c /present
parent72a0754f4605493fd60471557422f88a97eb356a (diff)
Fix present_notify to return right away when querying current or past msc.
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@ens.fr> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'present')
-rw-r--r--present/present.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/present/present.c b/present/present.c
index 47566c74e..a9f221418 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);
}