From 2ed619f5de2d10ccb1dbf9ea81da5807467dccf0 Mon Sep 17 00:00:00 2001
From: Adel Gadllah <adel.gadllah@gmail.com>
Date: Thu, 24 Jul 2014 15:51:41 +0200
Subject: [PATCH] st-scroll-view-fade: Refuse to work without GLSL
Disable the effect when GLSL is not available otherwise we will
crash later.
https://bugzilla.gnome.org/show_bug.cgi?id=733623
---
src/st/st-scroll-view-fade.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/st/st-scroll-view-fade.c b/src/st/st-scroll-view-fade.c
index ded8efb..b326d15 100644
--- a/src/st/st-scroll-view-fade.c
+++ b/src/st/st-scroll-view-fade.c
@@ -191,6 +191,15 @@ st_scroll_view_fade_set_actor (ClutterActorMeta *meta,
g_return_if_fail (actor == NULL || ST_IS_SCROLL_VIEW (actor));
+ if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
+ {
+ /* if we don't have support for GLSL shaders then we
+ * forcibly disable the ActorMeta
+ */
+ clutter_actor_meta_set_enabled (meta, FALSE);
+ return;
+ }
+
if (self->vadjustment)
{
g_signal_handlers_disconnect_by_func (self->vadjustment,
--
1.9.3