From 0faf0b7dedb6b083ed609fef374b457692036fe5 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauld.mccarthy@gmail.com>
Date: Tue, 6 Jan 2015 10:21:19 +0000
Subject: [PATCH] Tweaking splashscreen logic - works over SSH on jalapeno

---
 fsl/fslview/gl/__init__.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/fsl/fslview/gl/__init__.py b/fsl/fslview/gl/__init__.py
index a83477ea9..36056cd92 100644
--- a/fsl/fslview/gl/__init__.py
+++ b/fsl/fslview/gl/__init__.py
@@ -148,8 +148,8 @@ def getWXGLContext():
         # to display a splash screen ...
         frame = wx.SplashScreen(
             wx.Bitmap('splash.png', wx.BITMAP_TYPE_PNG),
-            wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
-            1500,
+            wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_NO_TIMEOUT,
+            -1,
             None)
         canvas = wxgl.GLCanvas(frame)
         canvas.SetSize((0, 0))
@@ -157,10 +157,15 @@ def getWXGLContext():
         # Even worse - on Linux/GTK,the canvas
         # has to visible before we are able to
         # set it as the target of the GL context
+        frame.Update()
+        frame.Show()
         wx.Yield()
         
         thismod._wxGLContext = wxgl.GLContext(canvas)
         thismod._wxGLContext.SetCurrent(canvas)
+        
+        wx.CallAfter(frame.Close)
+
 
     return thismod._wxGLContext
 
-- 
GitLab