Ejemplo n.º 1
0
 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);
 }