![Dana Jansens](/assets/img/avatar_default.png)
This way we can use the same name with options for an interactive action and a non-interactive action. Shorten the names of the ObActionsInteractive* functions to ObActionsI* Add a ObActionsIPreFunc that is called for interactive actions before the interactivity (key/mouse grab) is started. Add a ObActionsIPostFunc that is called for interactive actions after the interactiviti (key/mouse grab) has ended.
24 lines
596 B
C
24 lines
596 B
C
#include "openbox/actions.h"
|
|
#include "openbox/stacking.h"
|
|
#include "openbox/window.h"
|
|
|
|
static gboolean run_func(ObActionsData *data, gpointer options);
|
|
|
|
void action_lower_startup(void)
|
|
{
|
|
actions_register("Lower",
|
|
NULL, NULL,
|
|
run_func);
|
|
}
|
|
|
|
/* Always return FALSE because its not interactive */
|
|
static gboolean run_func(ObActionsData *data, gpointer options)
|
|
{
|
|
if (data->client) {
|
|
actions_client_move(data, TRUE);
|
|
stacking_lower(CLIENT_AS_WINDOW(data->client));
|
|
actions_client_move(data, FALSE);
|
|
}
|
|
|
|
return FALSE;
|
|
}
|