only enable expose-event when in the drag_motion method
This commit is contained in:
parent
e3d3118d67
commit
0e95abf66f
|
@ -91,6 +91,7 @@ class TerminatorTerm (gtk.VBox):
|
|||
#self._vte.set_double_buffered(True)
|
||||
self._vte.set_size (80, 24)
|
||||
self.reconfigure_vte ()
|
||||
self._vte._expose_data = None
|
||||
self._vte.show ()
|
||||
|
||||
self._termbox = gtk.HBox ()
|
||||
|
@ -123,7 +124,6 @@ class TerminatorTerm (gtk.VBox):
|
|||
self._vte.connect ("key-press-event", self.on_vte_key_press)
|
||||
self._vte.connect ("button-press-event", self.on_vte_button_press)
|
||||
self._vte.connect ("popup-menu", self.on_vte_popup_menu)
|
||||
self._vte._expose_data = None
|
||||
"""drag and drop"""
|
||||
srcvtetargets = [ ( "vte", gtk.TARGET_SAME_APP, self.TARGET_TYPE_VTE ) ]
|
||||
dsttargets = [ ( "vte", gtk.TARGET_SAME_APP, self.TARGET_TYPE_VTE ), ('text/plain', 0, 0) , ("STRING", 0, 0), ("COMPOUND_TEXT", 0, 0)]
|
||||
|
@ -148,7 +148,6 @@ class TerminatorTerm (gtk.VBox):
|
|||
self._vte.connect ("focus-out-event", self.on_vte_focus_out)
|
||||
self._vte.connect ("focus-in-event", self.on_vte_focus_in)
|
||||
|
||||
self._vte.connect('expose-event', self.on_expose_event)
|
||||
|
||||
|
||||
exit_action = self.conf.exit_action
|
||||
|
@ -274,9 +273,11 @@ text/plain
|
|||
#here, we define some widget internal values
|
||||
widget._expose_data = { 'color': color, 'coord' : coord }
|
||||
#redraw by forcing an event
|
||||
connec = widget.connect('expose-event', self.on_expose_event)
|
||||
widget.window.invalidate_rect(rect, True)
|
||||
widget.window.process_updates(True)
|
||||
#finaly reset the values
|
||||
widget.disconnect(connec)
|
||||
widget._expose_data = None
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue