I haven't looked at the sawmill code, so don't know what it does at the
moment.

Dia just uses the normal gtk_menu_popup() function to popup the menu (or
if GNOME support is enabled, gnome_popup_menu_do_popup() (which is pretty 
much just a wrapper for gtk_menu_popup). The call should look something
like:
  gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, button, time);

The first two NULLs say that the menu has no parent (they are usually only
used by gtk internally to position submenus).  The second two NULLs say to
use gtk's default positioning algorithm, which is to pop the menu up at
the mouse position, or nearby so that the menu apears on the screen.

The last two arguments are which button was pressed, and the event time
for the press.  If you are doing this in response to a button_press_event
signal, you can use the button and time members of the GdkEventButton
structure passed to the signal handler.  These are equivalent to the
structure members of the same name in the XButtonEvent, if sawmill uses
xlib at that level.  If you don't know the time of the event, it is
usually safe to pass 0.

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Mon, 28 Feb 2000, Geoff Jacobsen wrote:

> Hi all,
> 
> Sorry to butt in on you mailing list but we have a problem on the
> sawmill Window Manager project that I thought you folks might be able
> to help with:
> 
> In Sawmill we have a problem that when invoking a popup menu too close
> to the right-hand-edge of the screen, some of it disappears off the
> screen.
> 
> I noticed this problem in abiword as well but not in Dia. John Harper
> the developer for sawmill doesn't have any solutions to the problem;
> his menus are created dynamically in a sub-program and he doesn't know
> there size before they are invoked.
> 
> Any clues would be very much be appreciated, thanks.
> 
> 
> Here's a message on the subject from the sawmill mailing list.
> 
> BTW I don't subscribe to the Dia list so please CC [EMAIL PROTECTED]
> any discussion, thanks.
> 
> 

Reply via email to