(self, widget, drag_context, x, y, _time, _data)
*shrug*
*shrug*
* shrug *
def on_drag_motion(self, widget, drag_context, x, y, _time, _data):
        """*shrug*"""
        if not drag_context.list_targets() == [Gdk.atom_intern('vte', False)] and \
           (Gtk.targets_include_text(drag_context.list_targets()) or
           Gtk.targets_include_uri(drag_context.list_targets())):
            # copy text from another widget
            return
        srcwidget = Gtk.drag_get_source_widget(drag_context)
        if(isinstance(srcwidget, Gtk.EventBox) and
           srcwidget == self.titlebar) or widget == srcwidget:
            # on self
            return

        alloc = widget.get_allocation()

        if self.config['use_theme_colors']:
            color = self.vte.get_style_context().get_color(Gtk.StateType.NORMAL)  # VERIFY FOR GTK3 as above
        else:
            color = Gdk.RGBA()
            color.parse(self.config['foreground_color'])  # VERIFY FOR GTK3

        pos = self.get_location(widget, x, y)
        topleft = (0, 0)
        topright = (alloc.width, 0)
        topmiddle = (alloc.width/2, 0)
        bottomleft = (0, alloc.height)
        bottomright = (alloc.width, alloc.height)
        bottommiddle = (alloc.width/2, alloc.height)
        middleleft = (0, alloc.height/2)
        middleright = (alloc.width, alloc.height/2)

        coord = ()
        if pos == "right":
            coord = (topright, topmiddle, bottommiddle, bottomright)
        elif pos == "top":
            coord = (topleft, topright, middleright , middleleft)
        elif pos == "left":
            coord = (topleft, topmiddle, bottommiddle, bottomleft)
        elif pos == "bottom":
            coord = (bottomleft, bottomright, middleright , middleleft)

        # here, we define some widget internal values
        widget._draw_data = { 'color': color, 'coord' : coord }
        # redraw by forcing an event
        connec = widget.connect_after('draw', self.on_draw)
        widget.queue_draw_area(0, 0, alloc.width, alloc.height)
        widget.get_window().process_updates(True)
        # finaly reset the values
        widget.disconnect(connec)
        widget._draw_data = None
def on_drag_motion ( self , widget , drag_context , x , y , _time , _data ) : if not drag_context . list_targets ( ) == [ Gdk . atom_intern ( 'vte' , False ) ] and ( Gtk . targets_include_text ( drag_context . list_targets ( ) ) or Gtk . targets_include_uri ( drag_context . list_targets ( ) ) ) : # copy text from another widget return srcwidget = Gtk . drag_get_source_widget ( drag_context ) if ( isinstance ( srcwidget , Gtk . EventBox ) and srcwidget == self . titlebar ) or widget == srcwidget : # on self return alloc = widget . get_allocation ( ) if self . config [ 'use_theme_colors' ] : color = self . vte . get_style_context ( ) . get_color ( Gtk . StateType . NORMAL ) # VERIFY FOR GTK3 as above else : color = Gdk . RGBA ( ) color . parse ( self . config [ 'foreground_color' ] ) # VERIFY FOR GTK3 pos = self . get_location ( widget , x , y ) topleft = ( 0 , 0 ) topright = ( alloc . width , 0 ) topmiddle = ( alloc . width / 2 , 0 ) bottomleft = ( 0 , alloc . height ) bottomright = ( alloc . width , alloc . height ) bottommiddle = ( alloc . width / 2 , alloc . height ) middleleft = ( 0 , alloc . height / 2 ) middleright = ( alloc . width , alloc . height / 2 ) coord = ( ) if pos == "right" : coord = ( topright , topmiddle , bottommiddle , bottomright ) elif pos == "top" : coord = ( topleft , topright , middleright , middleleft ) elif pos == "left" : coord = ( topleft , topmiddle , bottommiddle , bottomleft ) elif pos == "bottom" : coord = ( bottomleft , bottomright , middleright , middleleft ) # here, we define some widget internal values widget . _draw_data = { 'color' : color , 'coord' : coord } # redraw by forcing an event connec = widget . connect_after ( 'draw' , self . on_draw ) widget . queue_draw_area ( 0 , 0 , alloc . width , alloc . height ) widget . get_window ( ) . process_updates ( True ) # finaly reset the values widget . disconnect ( connec ) widget . _draw_data = None