summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2007-08-08 00:40:32 +0200
committerGuillaume Seguin <guillaume@segu.in>2007-08-08 00:40:32 +0200
commit861f242ad70eb7fda1220cc19cb3773eaada7349 (patch)
tree51a30d26fb9d8f639b89a4755ca49ba5895ace39
parent9f148fb10f1a25eb0d0fc3c4cfc57f1b6fb1b01e (diff)
downloadgshaderedit-master.tar.gz
gshaderedit-master.tar.bz2
* Redraw after 500ms to workaround compiz animation glitches on some GPU'sHEADmaster
-rwxr-xr-xgshaderedit.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/gshaderedit.in b/gshaderedit.in
index 3ed346e..17985f8 100755
--- a/gshaderedit.in
+++ b/gshaderedit.in
@@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import pygtk
pygtk.require ('2.0')
+
+import gobject
import gtk
import gtk.glade
@@ -73,6 +75,7 @@ class gShaderEdit ():
def show (self):
'''Show application'''
self.mainWindow.show_all ()
+ gobject.timeout_add (500, self.force_redraw)
def gtk_main_quit (self, *args):
'''Quit gtk main loop'''
@@ -187,6 +190,11 @@ class gShaderEdit ():
else:
self.previewArea.load_texture (file)
+ def force_redraw (self):
+ '''Redraw preview'''
+ if self.previewArea:
+ self.previewArea.redraw ()
+
if __name__ == "__main__":
editor = gShaderEdit ()
editor.show ()