diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-04-26 05:08:33 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-04-26 05:08:33 +0000 |
| commit | 26879183e96f5a0d981e6ae76fda82a0d4564b20 (patch) | |
| tree | e956f1589a75b4e37b30670b3c1b7803faeac642 /openbox/menu.h | |
| parent | 853a5b6b042cad94aa9c81290ed3bed34a6ae90d (diff) | |
place the client menu at the top left of the window when opening it with a key binding.
change how the first menus are placed. place them like other people place menus. maybe this is good, maybe it is bad, we will see..
Diffstat (limited to 'openbox/menu.h')
| -rw-r--r-- | openbox/menu.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/openbox/menu.h b/openbox/menu.h index 2315351a..fc859a8b 100644 --- a/openbox/menu.h +++ b/openbox/menu.h @@ -41,6 +41,13 @@ typedef void (*ObMenuUpdateFunc)(struct _ObMenuFrame *frame, gpointer data); typedef void (*ObMenuExecuteFunc)(struct _ObMenuEntry *entry, guint state, gpointer data, Time time); typedef void (*ObMenuDestroyFunc)(struct _ObMenu *menu, gpointer data); +/*! @param x is the mouse x coordinate. on return it should be the x coordinate + for the menu + @param y is the mouse y coordinate. on return it should be the y coordinate + for the menu +*/ +typedef void (*ObMenuPlaceFunc)(struct _ObMenuFrame *frame, gint *x, gint *y, + gint button, gpointer data); struct _ObMenu { @@ -70,6 +77,7 @@ struct _ObMenu ObMenuUpdateFunc update_func; ObMenuExecuteFunc execute_func; ObMenuDestroyFunc destroy_func; + ObMenuPlaceFunc place_func; /* Pipe-menu parent, we get destroyed when it is destroyed */ ObMenu *pipe_creator; @@ -144,11 +152,13 @@ void menu_pipe_execute(ObMenu *self); void menu_show_all_shortcuts(ObMenu *self, gboolean show); -void menu_show(gchar *name, gint x, gint y, struct _ObClient *client); +void menu_show(gchar *name, gint x, gint y, gint button, + struct _ObClient *client); void menu_set_update_func(ObMenu *menu, ObMenuUpdateFunc func); void menu_set_execute_func(ObMenu *menu, ObMenuExecuteFunc func); void menu_set_destroy_func(ObMenu *menu, ObMenuDestroyFunc func); +void menu_set_place_func(ObMenu *menu, ObMenuPlaceFunc func); /* functions for building menus */ /*! @param allow_shortcut this should be false when the label is coming from |
