public bool ProcessButtonPress(Gdk.EventButton ev) { if (GtkWorkarounds.TriggersContextMenu(ev)) { parentMenu.ShowContextMenu(this); } else if (ev.Button == 1) { IDesignArea area = GetDesignArea(); if (area == null) { return(true); } // Clicking a selected item starts the edit mode if (area.IsSelected(this)) { editOnRelease = true; return(true); } } Select(); return(true); }
void OnToolItemPress(object ob, Gtk.ButtonPressEventArgs args) { if (wrapper != null && wrapper.Project.Selection != wrapper.Wrapped) { wrapper.Select(); args.RetVal = true; return; } if (args.Event.Button == 1 && !GtkWorkarounds.TriggersContextMenu(args.Event)) { motionDrag = true; } args.RetVal = ProcessButtonPress(args.Event); }