xfdesktop changes ?

Brian J. Tarricone bjt23 at cornell.edu
Tue Jan 13 18:37:22 CET 2009


jp.guillemin wrote:
> from xfce-desktop.c :
> ______________________________________
> static gboolean
> xfce_desktop_button_press_event(GtkWidget *w,
>                                GdkEventButton *evt)
> {
>    guint button = evt->button;
>    guint state = evt->state;
>      if(evt->type == GDK_BUTTON_PRESS) {
>        if(button == 2 || (button == 1 && (state & GDK_SHIFT_MASK)
>                           && (state & GDK_CONTROL_MASK)))
>        {
>            xfce_desktop_popup_secondary_root_menu(XFCE_DESKTOP(w),
>                                                   button, evt->time);
>            return TRUE;
>        } else if(button == 3 || (button == 1 && (state & 
> GDK_SHIFT_MASK))) {
>            xfce_desktop_popup_root_menu(XFCE_DESKTOP(w),
>                                         button, evt->time);
>            return TRUE;
>        }
>    }
>      return FALSE;
> }
> ______________________________________
> 
> button == 1, button == 2 , button == 3 ... I think that each mouse 
> button can be mapped to whatever callback... no ?

If it were that easy, I would have done it already.  I'd ask you not to 
presume to know more about my code than I do, mmm?

	-b




More information about the Xfce4-dev mailing list