X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.h;h=da796d5bfed5db11ab80a378eeb29c984bf524ec;hb=9cf5903e16c68ce1877d8d04ca6ee1c28e04a5ce;hp=191bcfe8f4c5d68eb1397d7db94e56d40988199b;hpb=fbc7607fbd1a380428a53094e727ac7631871bd4;p=chaz%2Fopenbox diff --git a/openbox/menuframe.h b/openbox/menuframe.h index 191bcfe8..da796d5b 100644 --- a/openbox/menuframe.h +++ b/openbox/menuframe.h @@ -50,6 +50,7 @@ struct _ObMenuFrame ObMenuFrame *parent; ObMenuEntryFrame *parent_entry; ObMenuFrame *child; + ObMenuEntryFrame *child_entry; GList *entries; ObMenuEntryFrame *selected; @@ -71,8 +72,15 @@ struct _ObMenuFrame gint monitor; /* monitor on which to show the menu in xinerama */ - RrAppearance *a_title; + /* We make a copy of this for each menu, so that we don't have to re-render + the background of the entire menu each time we render an item inside it. + */ RrAppearance *a_items; + + gboolean got_press; /* don't allow a KeyRelease event to run things in the + menu until it has seen a KeyPress. this is to + avoid having the keybinding used to show the menu + end up running something inside the menu */ }; struct _ObMenuEntryFrame @@ -89,22 +97,6 @@ struct _ObMenuEntryFrame Window icon; Window text; Window bullet; - - RrAppearance *a_normal; - RrAppearance *a_selected; - RrAppearance *a_disabled; - RrAppearance *a_disabled_selected; - - RrAppearance *a_icon; - RrAppearance *a_mask; - RrAppearance *a_bullet_normal; - RrAppearance *a_bullet_selected; - RrAppearance *a_separator; - RrAppearance *a_text_normal; - RrAppearance *a_text_selected; - RrAppearance *a_text_disabled; - RrAppearance *a_text_disabled_selected; - RrAppearance *a_text_title; }; extern GHashTable *menu_frame_map; @@ -135,6 +127,8 @@ void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry, gboolean immediate); void menu_frame_select_previous(ObMenuFrame *self); void menu_frame_select_next(ObMenuFrame *self); +void menu_frame_select_first(ObMenuFrame *self); +void menu_frame_select_last(ObMenuFrame *self); ObMenuFrame* menu_frame_under(gint x, gint y); ObMenuEntryFrame* menu_entry_frame_under(gint x, gint y);