app, libgimpwidgets: new gimp_event_triggers_context_menu() and use it…
… for the container tree view contextual menu. A very annoying point of contextual menus is that they happen on button press whereas menu item selection happens on button release. When the menu corner is positionned on the click position, nothing bad happens; yet when place is missing on screen, the menu might get positionned over the pointer position. And worse, the mouse position might be just over an activatable menu item. So we end up in this weird situation where a click implies: press, menu opens, release, random item (whatever is below the pointer) is selected and menu closes. To get rid of this weird case, let's have our contextual menu happen on button release. In reality, I don't think anyone cares that it happens on press or release, you just "click". But what you certainly don't want is to click random menu items!
This commit is contained in:
@ -30,6 +30,9 @@ G_BEGIN_DECLS
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
|
||||
gboolean gimp_event_triggers_context_menu (const GdkEvent *event,
|
||||
gboolean on_release);
|
||||
|
||||
GtkWidget * gimp_grid_attach_aligned (GtkGrid *grid,
|
||||
gint left,
|
||||
gint top,
|
||||
|
Reference in New Issue
Block a user