aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/present/present.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-06-26 09:30:29 +0200
committermarha <marha@users.sourceforge.net>2014-06-26 09:30:29 +0200
commitc30d5eefc96925b4bef781806c7a0114eca1b8e0 (patch)
tree420bb99ba463e5df728e71214ea6aaed0ad18fcb /xorg-server/present/present.c
parentd435b20322433b335a4fc5693cce0399a3f27b2d (diff)
downloadvcxsrv-c30d5eefc96925b4bef781806c7a0114eca1b8e0.tar.gz
vcxsrv-c30d5eefc96925b4bef781806c7a0114eca1b8e0.tar.bz2
vcxsrv-c30d5eefc96925b4bef781806c7a0114eca1b8e0.zip
Opdated to openssl-1.0.1h
xkeyboard-config fontconfig libX11 libxcb xcb-proto mesa xserver git update 26 June 2014 xserver commit a3b44ad8db1fa2f3b81c1ff9498f31c5323edd37 libxcb commit 125135452a554e89e49448e2c1ee6658324e1095 libxcb/xcb-proto commit 84bfd909bc3774a459b11614cfebeaa584a1eb38 xkeyboard-config commit 39a226707b133ab5540c2d30176cb3857e74dcca libX11 commit a4679baaa18142576d42d423afe816447f08336c fontconfig commit 274f2181f294af2eff3e8db106ec8d7bab2d3ff1 mesa commit 9a8acafa47558cafeb37f80f4b30061ac1962c69
Diffstat (limited to 'xorg-server/present/present.c')
-rw-r--r--xorg-server/present/present.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/xorg-server/present/present.c b/xorg-server/present/present.c
index 1bf3a5865..3aea0d7c6 100644
--- a/xorg-server/present/present.c
+++ b/xorg-server/present/present.c
@@ -383,6 +383,24 @@ present_set_tree_pixmap(WindowPtr window, PixmapPtr pixmap)
}
static void
+present_set_abort_flip(ScreenPtr screen)
+{
+ present_screen_priv_ptr screen_priv = present_screen_priv(screen);
+
+ /* Switch back to using the screen pixmap now to avoid
+ * 2D applications drawing to the wrong pixmap.
+ */
+
+ if (screen_priv->flip_window)
+ present_set_tree_pixmap(screen_priv->flip_window,
+ (*screen->GetScreenPixmap)(screen));
+
+ present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen));
+
+ screen_priv->flip_pending->abort_flip = TRUE;
+}
+
+static void
present_unflip(ScreenPtr screen)
{
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
@@ -511,7 +529,7 @@ present_check_flip_window (WindowPtr window)
if (flip_pending->window == window) {
if (!present_check_flip(flip_pending->crtc, window, flip_pending->pixmap,
flip_pending->sync_flip, NULL, 0, 0))
- flip_pending->abort_flip = TRUE;
+ present_set_abort_flip(screen);
}
} else {
/*
@@ -578,6 +596,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
}
xorg_list_del(&vblank->event_queue);
+ xorg_list_del(&vblank->window_list);
vblank->queued = FALSE;
if (vblank->pixmap && vblank->window) {
@@ -633,7 +652,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
/* Check pending flip
*/
if (window == screen_priv->flip_pending->window)
- screen_priv->flip_pending->abort_flip = TRUE;
+ present_set_abort_flip(screen);
} else if (!screen_priv->unflip_event_id) {
/* Check current flip
@@ -752,7 +771,7 @@ present_pixmap(WindowPtr window,
if (!vblank->queued)
continue;
- if (vblank->crtc != target_crtc || vblank->target_msc > target_msc)
+ if (vblank->crtc != target_crtc || vblank->target_msc != target_msc)
continue;
DebugPresent(("\tx %lld %p %8lld: %08lx -> %08lx (crtc %p)\n",
@@ -915,7 +934,7 @@ present_flip_destroy(ScreenPtr screen)
/* Do the actual cleanup once the flip has been performed by the hardware */
if (screen_priv->flip_pending)
- screen_priv->flip_pending->abort_flip = TRUE;
+ present_set_abort_flip(screen);
}
void