]>
Dogcows Code - chaz/openbox/blob - openbox/actions/maximizevertical.c
516463c768c193eb62bce7bfbcad77d73aacde1e
1 #include "openbox/actions.h"
2 #include "openbox/client.h"
9 static gpointer
setup_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
);
10 static void free_func(gpointer options
);
11 static gboolean
run_func(ObActionsData
*data
, gpointer options
);
13 void action_maximizevertical_startup()
15 actions_register("MaximizeVertical",
22 static gpointer
setup_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
)
27 o
= g_new0(Options
, 1);
30 if ((n
= parse_find_node("state", node
))) {
31 gchar
*s
= parse_string(doc
, n
);
32 if (g_ascii_strcasecmp(s
, "toggle")) {
34 o
->on
= parse_bool(doc
, n
);
42 static void free_func(gpointer options
)
49 /* Always return FALSE because its not interactive */
50 static gboolean
run_func(ObActionsData
*data
, gpointer options
)
55 actions_client_move(data
, TRUE
);
58 client_maximize(data
->client
, !data
->client
->max_vert
, 2);
60 client_maximize(data
->client
, o
->on
, 2);
62 actions_client_move(data
, FALSE
);
This page took 0.036191 seconds and 4 git commands to generate.