Skip to content

Commit 72363ad

Browse files
Mikael MagnussonMikachu
authored andcommitted
Add "de" option to Iconify action that makes it deiconify windows (useful while alt-tabbing).
1 parent 127ae43 commit 72363ad

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

openbox/actions/iconify.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,32 @@
22
#include "openbox/client.h"
33

44
static gboolean run_func(ObActionsData *data, gpointer options);
5+
static gpointer setup_func(xmlNodePtr node);
56

67
void action_iconify_startup(void)
78
{
89
actions_register("Iconify",
9-
NULL, NULL,
10+
setup_func,
11+
NULL,
1012
run_func);
1113
}
1214

15+
static gpointer setup_func(xmlNodePtr node)
16+
{
17+
xmlNodePtr n;
18+
19+
if ((n = obt_xml_find_node(node, "de")))
20+
return GINT_TO_POINTER(obt_xml_node_bool(n));
21+
22+
return GINT_TO_POINTER(0);
23+
}
24+
1325
/* Always return FALSE because its not interactive */
1426
static gboolean run_func(ObActionsData *data, gpointer options)
1527
{
1628
if (data->client) {
1729
actions_client_move(data, TRUE);
18-
client_iconify(data->client, TRUE, TRUE, FALSE);
30+
client_iconify(data->client, !options, TRUE, FALSE);
1931
actions_client_move(data, FALSE);
2032
}
2133

0 commit comments

Comments
 (0)