-#if 0
-void action_desktop_right(union ActionData *data)
-{
- guint r, c, d;
-
- cur_row_col(&r, &c);
- ++c;
- if (c >= screen_desktop_layout.columns) {
- if (!data->desktopdir.wrap) return;
- c = 0;
- }
- d = translate_row_col(r, c);
- if (d >= screen_num_desktops) {
- if (!data->desktopdir.wrap) return;
- ++c;
- }
- d = translate_row_col(r, c);
- if (d < screen_num_desktops)
- screen_cycle_desktop(d, data->desktopdir.final,
- data->desktopdir.cancel);
-}
-
-void action_send_to_desktop_right(union ActionData *data)
-{
- ObClient *cl = data->sendto.c;
- guint r, c, d;
-
- if (!cl || !client_normal(cl)) return;
-
- cur_row_col(&r, &c);
- ++c;
- if (c >= screen_desktop_layout.columns) {
- if (!data->sendtodir.wrap) return;
- c = 0;
- }
- d = translate_row_col(r, c);
- if (d >= screen_num_desktops) {
- if (!data->sendtodir.wrap) return;
- ++c;
- }
- d = translate_row_col(r, c);
- if (d < screen_num_desktops) {
- client_set_desktop(cl, d, data->sendtodir.follow);
- if (data->sendtodir.follow)
- screen_cycle_desktop(d, data->desktopdir.final,
- data->desktopdir.cancel);
- }
-}
-
-void action_desktop_left(union ActionData *data)
-{
- guint r, c, d;
-
- cur_row_col(&r, &c);
- --c;
- if (c >= screen_desktop_layout.columns) {
- if (!data->desktopdir.wrap) return;
- c = screen_desktop_layout.columns - 1;
- }
- d = translate_row_col(r, c);
- if (d >= screen_num_desktops) {
- if (!data->desktopdir.wrap) return;
- --c;
- }
- d = translate_row_col(r, c);
- if (d < screen_num_desktops)
- screen_cycle_desktop(d, data->desktopdir.final,
- data->desktopdir.cancel);
-}
-
-void action_send_to_desktop_left(union ActionData *data)
-{
- ObClient *cl = data->sendto.c;
- guint r, c, d;
-
- if (!cl || !client_normal(cl)) return;
-
- cur_row_col(&r, &c);
- --c;
- if (c >= screen_desktop_layout.columns) {
- if (!data->sendtodir.wrap) return;
- c = screen_desktop_layout.columns - 1;
- }
- d = translate_row_col(r, c);
- if (d >= screen_num_desktops) {
- if (!data->sendtodir.wrap) return;
- --c;
- }
- d = translate_row_col(r, c);
- if (d < screen_num_desktops) {
- client_set_desktop(cl, d, data->sendtodir.follow);
- if (data->sendtodir.follow)
- screen_cycle_desktop(d, data->desktopdir.final,
- data->desktopdir.cancel);
- }
-}
-
-void action_desktop_down(union ActionData *data)
-{
- guint r, c, d;
-
- cur_row_col(&r, &c);
- ++r;
- if (r >= screen_desktop_layout.rows) {
- if (!data->desktopdir.wrap) return;
- r = 0;
- }
- d = translate_row_col(r, c);
- if (d >= screen_num_desktops) {
- if (!data->desktopdir.wrap) return;
- ++r;
- }
- d = translate_row_col(r, c);
- if (d < screen_num_desktops)
- screen_cycle_desktop(d, data->desktopdir.final,
- data->desktopdir.cancel);
-}
-
-void action_send_to_desktop_down(union ActionData *data)
-{
- guint r, c, d;
-
- if (data->sendtodir.c) {
- cur_row_col(&r, &c);
- ++r;
- if (r >= screen_desktop_layout.rows) {
- if (!data->sendtodir.wrap) return;
- r = 0;
- }
- d = translate_row_col(r, c);
- if (d >= screen_num_desktops) {
- if (!data->sendtodir.wrap) return;
- ++r;
- }
- d = translate_row_col(r, c);
- if (d < screen_num_desktops) {
- client_set_desktop(data->sendtodir.c, d, data->sendtodir.follow);
- if (data->sendtodir.follow)
- screen_cycle_desktop(d, data->desktopdir.final,
- data->desktopdir.cancel);
- }
- }
-}
-
-void action_desktop_up(union ActionData *data)
-{
- guint r, c, d;
-
- cur_row_col(&r, &c);
- --r;
- if (r >= screen_desktop_layout.rows) {
- if (!data->desktopdir.wrap) return;
- r = screen_desktop_layout.rows - 1;
- }
- d = translate_row_col(r, c);
- if (d >= screen_num_desktops) {
- if (!data->desktopdir.wrap) return;
- --r;
- }
- d = translate_row_col(r, c);
- if (d < screen_num_desktops)
- screen_cycle_desktop(d, data->desktopdir.final,
- data->desktopdir.cancel);
-}
-
-void action_send_to_desktop_up(union ActionData *data)
-{
- guint r, c, d;
-
- if (data->sendtodir.c) {
- cur_row_col(&r, &c);
- --r;
- if (r >= screen_desktop_layout.rows) {
- if (!data->sendtodir.wrap) return;
- r = screen_desktop_layout.rows - 1;
- }
- d = translate_row_col(r, c);
- if (d >= screen_num_desktops) {
- if (!data->sendtodir.wrap) return;
- --r;
- }
- d = translate_row_col(r, c);
- if (d < screen_num_desktops) {
- client_set_desktop(data->sendtodir.c, d, data->sendtodir.follow);
- if (data->sendtodir.follow)
- screen_cycle_desktop(d, data->desktopdir.final,
- data->desktopdir.cancel);
- }
- }
-}
-#endif
-