strange pop up menu behaviour from a clist
- From: Ramsés Morales <ramses computer org>
- To: gtk-list gnome org, gtk-app-devel-list gnome org
- Subject: strange pop up menu behaviour from a clist
- Date: 15 Feb 2002 11:38:56 -0500
Hi.
I set up the third mouse button as GTK_BUTTON_SELECTS on a clist.
I connect "select_row" to a callback that displays a pop up menu when
the third mouse button is pressed:
void
select_row_callback(GtkWidget *widget, gint row, gint column,
GdkEventButton *bevent, gpointer menu)
{
if ( bevent->button == 3 ) {
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
0, bevent->time);
}
}
if I click the third mouse button on that menu, it works immediately,
but if I press the first mouse button, I have to do it twice to activate
a menu option.
I have to do this to make it work as expected, but it contradicts the
purpose of the button parameter on gtk_menu_popup:
void
select_row_callback(GtkWidget *widget, gint row, gint column,
GdkEventButton *bevent, gpointer menu)
{
if ( bevent->button == 3 ) {
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
0, bevent->time);
}
}
Is this a bug, a feature, or am I misunderstanding something????
Thanks for your help.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]