protected override bool OnButtonPressEvent(Gdk.EventButton evnt) { if (bar.Frame.OverlayWidgetVisible) { return(false); } if (evnt.TriggersContextMenu()) { it.ShowDockPopupMenu(evnt.Time); } else if (evnt.Button == 1) { if (evnt.Type == Gdk.EventType.TwoButtonPress) { // Instead of changing the state of the pad here, do it when the button is released. // Changing the state will make this bar item to vanish before the ReleaseEvent is received, and in this // case the ReleaseEvent may be fired on another widget that is taking the space of this bar item. // This was happening for example with the feedback button. itemActivated = true; } else { AutoShow(); it.Present(true); } } return(true); }
protected override bool OnButtonPressEvent(Gdk.EventButton evnt) { if (evnt.TriggersContextMenu()) { item.ShowDockPopupMenu(evnt.Time); return(false); } else if (evnt.Button == 1) { if (evnt.Type == Gdk.EventType.ButtonPress) { tabPressed = true; pressX = evnt.X; pressY = evnt.Y; } else if (evnt.Type == Gdk.EventType.TwoButtonPress) { tabActivated = true; } } return(base.OnButtonPressEvent(evnt)); }