summaryrefslogtreecommitdiff
path: root/present
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-11-26 12:06:57 -0800
committerKeith Packard <keithp@keithp.com>2013-12-05 09:51:00 -0800
commit4aa77378de69efdc10bced6ba650b0ebff50c112 (patch)
treea4760d3c2ea8bd368f2eca57142a3136e6249c78 /present
parent3dd5bfe540b295bb37a2c2fd0ba4a31fb217612b (diff)
present: Clear target_crtc if driver lacks Present support
If the driver doesn't have the necessary hooks for Present, then the target_crtc needs to be set to NULL to make sure the extension uses the present_fake code. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'present')
-rw-r--r--present/present.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/present/present.c b/present/present.c
index 76e12ed5d..3fd5e8bb1 100644
--- a/present/present.c
+++ b/present/present.c
@@ -594,7 +594,9 @@ present_pixmap(WindowPtr window,
if (!window_priv)
return BadAlloc;
- if (!target_crtc) {
+ if (!screen_priv || !screen_priv->info)
+ target_crtc = NULL;
+ else if (!target_crtc) {
/* Update the CRTC if we have a pixmap or we don't have a CRTC
*/
if (!pixmap)