Menu data structures basically completed. Need the engine support still, parser, and controllers.
Scott Moynes smoynes@nexus.carleton.ca
5 files changed,
96 insertions(+),
19 deletions(-)
M
openbox/Makefile.am
→
openbox/Makefile.am
@@ -27,11 +27,11 @@ openbox3_LDADD=@LIBINTL@ ../render/librender.a
openbox3_LDFLAGS=-export-dynamic openbox3_SOURCES=client.c event.c extensions.c focus.c frame.c openbox.c \ prop.c screen.c stacking.c xerror.c timer.c dispatch.c \ - engine.c plugin.c action.c grab.c lex.cparse.c config.c + engine.c plugin.c action.c grab.c lex.cparse.c config.c menu.c noinst_HEADERS=client.h event.h extensions.h focus.h frame.h geom.h gettext.h \ openbox.h prop.h screen.h stacking.h xerror.h dispatch.h \ - timer.h engine.h plugin.h action.h grab.h config.h + timer.h engine.h plugin.h action.h grab.h config.h menu.h lex.cparse.c: cparse.l $(FLEX) -Pcparse $^
M
openbox/action.c
→
openbox/action.c
@@ -155,6 +155,10 @@ a = action_new(action_restart);
} else if (!g_ascii_strcasecmp(name, "exit")) { a = action_new(action_exit); } + else if (!g_ascii_strcasecmp(name, "showmenu")) { + a = action_new(action_showmenu); + } + return a; }@@ -623,10 +627,13 @@ int h = data->resize.y;
if (!c || !client_normal(c)) return; + /* XXX window snapping/struts */ + dispatch_resize(c, &w, &h, data->resize.corner); w -= c->frame->size.left + c->frame->size.right; h -= c->frame->size.top + c->frame->size.bottom; + client_configure(c, data->resize.corner, c->area.x, c->area.y, w, h, TRUE, data->resize.final); }@@ -641,3 +648,8 @@ void action_exit(union ActionData *data)
{ ob_shutdown = TRUE; } + +void action_showmenu(union ActionData *data) +{ + g_message(__FUNCTION__); +}
M
openbox/action.h
→
openbox/action.h
@@ -62,6 +62,11 @@ gboolean final;
Corner corner; }; +struct ShowMenu { + Client *c; + char * menuName; +}; + union ActionData { struct AnyAction any; struct Execute execute;@@ -73,6 +78,7 @@ struct Desktop desktop;
struct NextPreviousDesktop nextprevdesktop; struct Move move; struct Resize resize; + struct ShowMenu showMenu; }; typedef struct {@@ -185,5 +191,6 @@ /* Execute */
void action_restart(union ActionData *data); /* Any */ void action_exit(union ActionData *data); - +/* ShowMenu */ +void action_showmenu(union ActionData *data); #endif