summaryrefslogtreecommitdiff
path: root/xserver/present
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2015-11-07 16:48:54 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2015-11-07 16:48:54 +0000
commit6c07b8ab53c2bbf0feb0afbbe98b33171c7b7872 (patch)
tree35eb85f0db40ffe6e6614d780b3de61b93edb3bc /xserver/present
parentf4e01ac5608a8dfd9a4ee2f7aa43d28cc1710d81 (diff)
Update to xserver 1.17.4.
tested by naddy@
Diffstat (limited to 'xserver/present')
-rw-r--r--xserver/present/present.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/xserver/present/present.c b/xserver/present/present.c
index a6346015e..beb4ff03a 100644
--- a/xserver/present/present.c
+++ b/xserver/present/present.c
@@ -710,9 +710,9 @@ present_pixmap(WindowPtr window,
present_notify_ptr notifies,
int num_notifies)
{
- uint64_t ust;
+ uint64_t ust = 0;
uint64_t target_msc;
- uint64_t crtc_msc;
+ uint64_t crtc_msc = 0;
int ret;
present_vblank_ptr vblank, tmp;
ScreenPtr screen = window->drawable.pScreen;
@@ -734,13 +734,15 @@ present_pixmap(WindowPtr window,
target_crtc = present_get_crtc(window);
}
- present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc);
+ ret = present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc);
target_msc = present_window_to_crtc_msc(window, target_crtc, window_msc, crtc_msc);
- /* Stash the current MSC away in case we need it later
- */
- window_priv->msc = crtc_msc;
+ if (ret == Success) {
+ /* Stash the current MSC away in case we need it later
+ */
+ window_priv->msc = crtc_msc;
+ }
/* Adjust target_msc to match modulus
*/
@@ -931,7 +933,7 @@ present_notify_msc(WindowPtr window,
0, 0,
NULL,
NULL, NULL,
- PresentOptionAsync,
+ divisor == 0 ? PresentOptionAsync : 0,
target_msc, divisor, remainder, NULL, 0);
}