]>
Dogcows Code - chaz/openbox/blob - openbox/actions/moverelative.c
1 #include "openbox/actions.h"
2 #include "openbox/client.h"
3 #include "openbox/screen.h"
4 #include "openbox/frame.h"
5 #include <stdlib.h> /* for atoi */
12 static gpointer
setup_func(xmlNodePtr node
);
13 static gboolean
run_func(ObActionsData
*data
, gpointer options
);
15 void action_moverelative_startup(void)
17 actions_register("MoveRelative", setup_func
, g_free
, run_func
);
20 static gpointer
setup_func(xmlNodePtr node
)
25 o
= g_new0(Options
, 1);
27 if ((n
= obt_parse_find_node(node
, "x")))
28 o
->x
= obt_parse_node_int(n
);
29 if ((n
= obt_parse_find_node(node
, "y")))
30 o
->y
= obt_parse_node_int(n
);
35 /* Always return FALSE because its not interactive */
36 static gboolean
run_func(ObActionsData
*data
, gpointer options
)
42 gint x
, y
, lw
, lh
, w
, h
;
49 client_try_configure(c
, &x
, &y
, &w
, &h
, &lw
, &lh
, TRUE
);
50 client_find_onscreen(c
, &x
, &y
, w
, h
, FALSE
);
52 actions_client_move(data
, TRUE
);
53 client_configure(c
, x
, y
, w
, h
, TRUE
, TRUE
, FALSE
);
54 actions_client_move(data
, FALSE
);
This page took 0.038148 seconds and 4 git commands to generate.