add the showdesktop action
This commit is contained in:
parent
38268dc917
commit
1b7e813c62
7 changed files with 24 additions and 44 deletions
|
@ -158,6 +158,7 @@ openbox_openbox_SOURCES = \
|
|||
openbox/actions/all.h \
|
||||
openbox/actions/debug.c \
|
||||
openbox/actions/execute.c \
|
||||
openbox/actions/showdesktop.c \
|
||||
openbox/actions/showmenu.c \
|
||||
openbox/actions.c \
|
||||
openbox/actions.h \
|
||||
|
|
|
@ -775,21 +775,6 @@ ActionString actionstrings[] =
|
|||
action_toggle_dockautohide,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"toggleshowdesktop",
|
||||
action_toggle_show_desktop,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"showdesktop",
|
||||
action_show_desktop,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"unshowdesktop",
|
||||
action_unshow_desktop,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"desktoplast",
|
||||
action_desktop_last,
|
||||
|
@ -1895,21 +1880,6 @@ void action_toggle_dockautohide(union ActionData *data)
|
|||
dock_configure();
|
||||
}
|
||||
|
||||
void action_toggle_show_desktop(union ActionData *data)
|
||||
{
|
||||
screen_show_desktop(!screen_showing_desktop, NULL);
|
||||
}
|
||||
|
||||
void action_show_desktop(union ActionData *data)
|
||||
{
|
||||
screen_show_desktop(TRUE, NULL);
|
||||
}
|
||||
|
||||
void action_unshow_desktop(union ActionData *data)
|
||||
{
|
||||
screen_show_desktop(FALSE, NULL);
|
||||
}
|
||||
|
||||
void action_break_chroot(union ActionData *data)
|
||||
{
|
||||
/* break out of one chroot */
|
||||
|
|
|
@ -5,4 +5,5 @@ void action_all_startup()
|
|||
action_execute_startup();
|
||||
action_debug_startup();
|
||||
action_showmenu_startup();
|
||||
action_showdesktop_startup();
|
||||
}
|
||||
|
|
|
@ -6,5 +6,6 @@ void action_all_startup();
|
|||
void action_execute_startup();
|
||||
void action_debug_startup();
|
||||
void action_showmenu_startup();
|
||||
void action_showdesktop_startup();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,13 +8,6 @@ typedef struct {
|
|||
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
|
||||
static void free_func(gpointer options);
|
||||
static gboolean run_func(ObActionsData *data, gpointer options);
|
||||
/*
|
||||
static gboolean i_input_func(guint initial_state,
|
||||
XEvent *e,
|
||||
gpointer options,
|
||||
gboolean *used);
|
||||
static void i_cancel_func(gpointer options);
|
||||
*/
|
||||
|
||||
void action_debug_startup()
|
||||
{
|
||||
|
|
21
openbox/actions/showdesktop.c
Normal file
21
openbox/actions/showdesktop.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include "openbox/actions.h"
|
||||
#include "openbox/screen.h"
|
||||
|
||||
static gboolean run_func(ObActionsData *data, gpointer options);
|
||||
|
||||
void action_showdesktop_startup()
|
||||
{
|
||||
actions_register("ShowDesktop",
|
||||
NULL,
|
||||
NULL,
|
||||
run_func,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
/* Always return FALSE because its not interactive */
|
||||
static gboolean run_func(ObActionsData *data, gpointer options)
|
||||
{
|
||||
screen_show_desktop(!screen_showing_desktop, NULL);
|
||||
|
||||
return FALSE;
|
||||
}
|
|
@ -8,13 +8,6 @@ typedef struct {
|
|||
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
|
||||
static void free_func(gpointer options);
|
||||
static gboolean run_func(ObActionsData *data, gpointer options);
|
||||
/*
|
||||
static gboolean i_input_func(guint initial_state,
|
||||
XEvent *e,
|
||||
gpointer options,
|
||||
gboolean *used);
|
||||
static void i_cancel_func(gpointer options);
|
||||
*/
|
||||
|
||||
void action_showmenu_startup()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue