On Sun, 24 Jan 1999, Alexander Larsson verbalised:
> On 24 Jan, Lars Clausen wrote:
>>
>> Now I have now managed to get the menu up, and in a fairly nice way (as
>> you suggested, with a new ObjectOp). Now I just have the problem that
>> after the menu has been popped up, whether I have selected anything or
>> not, all input and refresh of that window stops. I am really without a
>> clue as to why this happens. I suppose there should be some cleanup or
>> something, but found nothing like it in the code or in the GTK docs.
>> You got any ideas?
>
> How do you get popup_menu_clicked called? Did you connect it to a
> signal?
> All events that goes to the canvas goes through ddisplay_canvas_events
> in app/disp_callbacks.c, did you add the call there?
Yes. The menu comes up perfect, the callback from the menu items gets
called, but then that window doesn't register events any more. The
appropriate part of dist_callbacks.c looks like this:
case GDK_BUTTON_PRESS:
bevent = (GdkEventButton *) event;
state = bevent->state;
switch (bevent->button)
{
case 1:
(*active_tool->button_press_func) (active_tool, bevent, ddisp);
break;
case 2:
popup_object_menu(bevent, ddisp);
break;
case 3:
popup_shell = ddisp->shell;
display_set_menu_sensitivity(ddisp);
gtk_menu_popup(GTK_MENU(ddisp->popup), NULL, NULL, NULL, NULL, 0, 0);
break;
default:
break;
}
break;
-Lars
--
Lars R. Clausen ([EMAIL PROTECTED])
A *real* smart bomb would call in sick, perhaps move to another country,
changing its name in the process, open a beach bar maybe and live out its
days in safe anonymity. -- Barry O'Neill in rhod