comparison pyink/frameline.py @ 968:a715301b5879

Start drawing after an expose event
author Thinker K.F. Li <thinker@codemud.net>
date Thu, 18 Nov 2010 11:54:37 +0800
parents 5c013e3cadd0
children d4b934d97a62
comparison
equal deleted inserted replaced
967:5c013e3cadd0 968:a715301b5879
144 self.connect('motion-notify-event', self._motion_hdl) 144 self.connect('motion-notify-event', self._motion_hdl)
145 self._num_frames = num_frames 145 self._num_frames = num_frames
146 self._keys = [] 146 self._keys = []
147 self._active_frame = -1 147 self._active_frame = -1
148 self._last_hover = -1 # frame index of last hover 148 self._last_hover = -1 # frame index of last hover
149 self._drawing = True 149 self._drawing = False
150 pass 150 pass
151 151
152 def _press_hdl(self, widget, event): 152 def _press_hdl(self, widget, event):
153 frame = event.x / self._frame_width 153 frame = event.x / self._frame_width
154 but = event.button 154 but = event.button
170 # 170 #
171 emask = win.get_events() 171 emask = win.get_events()
172 emask = emask | gtk.gdk.BUTTON_PRESS_MASK | \ 172 emask = emask | gtk.gdk.BUTTON_PRESS_MASK | \
173 gtk.gdk.POINTER_MOTION_MASK 173 gtk.gdk.POINTER_MOTION_MASK
174 win.set_events(emask) 174 win.set_events(emask)
175 self._drawing = True
175 pass 176 pass
176 self.update() 177 self.update()
177 pass 178 pass
178 179
179 def _draw_tween(self, first_key, last_key): 180 def _draw_tween(self, first_key, last_key):