GtkEvent Times



Hello,

I'm using xembed in my application, and I'm trying to move the gtksocket's
window when the gtkplug recieves a mouse press. The event data is sent over
DBUS.

The code for the plug looks like this:

def button_press (self, widget, event):
     self.__iface.button_press(None, event.button, event.x_root,
event.y_root, event.time)

The socket's code looks like this:

def button_press (self, widget, button, x_root, y_root, time):
    if button == 1:
        self.window.begin_move_drag(button, int(x_root), int(y_root), time)
    if button == 3:
        self.menu.popup(None, None, None, button, time)

Neither the menu.popup() nor the window.begin_move_drag() work as they
should. If I click repeatedly in the same place it works after several
clicks.

I suspect that the event time is the problem, but I'm not sure how to fix
it.

Thanks in advance,

Natan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]