add the fullscreen action

This commit is contained in:
Dana Jansens 2007-06-22 14:39:01 +00:00
parent cf478381b3
commit 1eb727064a
5 changed files with 27 additions and 12 deletions

View file

@ -163,6 +163,7 @@ openbox_openbox_SOURCES = \
openbox/actions/execute.c \
openbox/actions/exit.c \
openbox/actions/focus.c \
openbox/actions/fullscreen.c \
openbox/actions/iconify.c \
openbox/actions/lower.c \
openbox/actions/move.c \

View file

@ -569,11 +569,6 @@ ActionString actionstrings[] =
action_toggle_maximize_vert,
setup_client_action
},
{
"togglefullscreen",
action_toggle_fullscreen,
setup_client_action
},
{
"sendtodesktop",
action_send_to_desktop,
@ -1215,13 +1210,6 @@ void action_toggle_maximize_vert(union ActionData *data)
client_action_end(data, config_focus_under_mouse);
}
void action_toggle_fullscreen(union ActionData *data)
{
client_action_start(data);
client_fullscreen(data->client.any.c, !(data->client.any.c->fullscreen));
client_action_end(data, config_focus_under_mouse);
}
void action_send_to_desktop(union ActionData *data)
{
ObClient *c = data->sendto.any.c;

View file

@ -19,4 +19,5 @@ void action_all_startup()
action_raiselower_startup();
action_unfocus_startup();
action_iconify_startup();
action_fullscreen_startup();
}

View file

@ -20,5 +20,6 @@ void action_lower_startup();
void action_raiselower_startup();
void action_unfocus_startup();
void action_iconify_startup();
void action_fullscreen_startup();
#endif

View file

@ -0,0 +1,24 @@
#include "openbox/actions.h"
#include "openbox/client.h"
static gboolean run_func(ObActionsData *data, gpointer options);
void action_fullscreen_startup()
{
actions_register("Fullscreen",
NULL, NULL,
run_func,
NULL, NULL);
}
/* Always return FALSE because its not interactive */
static gboolean run_func(ObActionsData *data, gpointer options)
{
if (data->client) {
actions_client_move(data, TRUE);
client_fullscreen(data->client, !data->client->fullscreen);
actions_client_move(data, FALSE);
}
return FALSE;
}