]>
Dogcows Code - chaz/openbox/blob - openbox/actions/activate.c
c3f3f98e2b62b75a0e4b715b2b4606bb917ffcc4
1 #include "openbox/actions.h"
2 #include "openbox/event.h"
3 #include "openbox/client.h"
4 #include "openbox/focus.h"
12 static gpointer
setup_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
);
13 static void free_func(gpointer options
);
14 static gboolean
run_func(ObActionsData
*data
, gpointer options
);
16 void action_activate_startup()
18 actions_register("Activate",
25 static gpointer
setup_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
)
30 o
= g_new0(Options
, 1);
34 if ((n
= parse_find_node("here", node
)))
35 o
->here
= parse_bool(doc
, n
);
36 if ((n
= parse_find_node("raise", node
)))
37 o
->raise
= parse_bool(doc
, n
);
38 if ((n
= parse_find_node("unshade", node
)))
39 o
->unshade
= parse_bool(doc
, n
);
43 static void free_func(gpointer options
)
50 /* Always return FALSE because its not interactive */
51 static gboolean
run_func(ObActionsData
*data
, gpointer options
)
56 if (data
->button
== 0 || client_mouse_focusable(data
->client
) ||
57 data
->context
!= OB_FRAME_CONTEXT_CLIENT
||
58 data
->context
!= OB_FRAME_CONTEXT_FRAME
)
60 client_activate(data
->client
, o
->here
, o
->raise
, o
->unshade
, TRUE
);
63 /* focus action on something other than a client, make keybindings
64 work for this openbox instance, but don't focus any specific client
This page took 0.037268 seconds and 4 git commands to generate.